Skip to content

Commit d1c8bbe

Browse files
committed
prettier logging
1 parent 50b6c2b commit d1c8bbe

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/main/java/com/marginallyclever/nodegraphcore/NodeFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ private static void addNodeToCategoryTree(Class<? extends Node> typeFound,String
4949
String fullName = typeFound.getName();
5050
if(!fullName.startsWith(packageName)) throw new RuntimeException("class "+fullName+" not part of package "+packageName);
5151
// get the novel part of the package name
52-
fullName = fullName.substring(packageName.length()+1);
52+
String subName = fullName.substring(packageName.length()+1);
5353
// split into each sub-package.
54-
var parts = fullName.split("\\.");
54+
var parts = subName.split("\\.");
5555
// search the category tree for the nodes and add them as you go.
56-
System.out.println("Adding "+fullName);
56+
logger.info("Adding {}",subName);
5757
NodeCategory category = root;
5858
for(int i = 0 ; i < parts.length-1; i++) {
5959
String part = parts[i];

src/test/java/com/marginallyclever/nodegraphcore/TestNodeFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ public void testFindNodes() {
2929
}
3030

3131
@Test
32-
public void listAllNodesRegistered() throws Exception {
32+
public void listAllNodesRegistered() {
3333
NodeFactory.loadRegistries();
3434
System.out.println("All registered nodegraphcore nodes: "+ Arrays.toString(NodeFactory.getNames()));
3535
NodeFactory.clear();
3636
}
3737

3838
@Test
39-
public void testLoadingDonatelloExtensionsIfAvailable() throws Exception {
39+
public void testLoadingDonatelloExtensionsIfAvailable() {
4040
String sep = FileSystems.getDefault().getSeparator();
4141
String path = System.getProperty("user.home") + sep + "Donatello" + sep + "extensions" + sep;
4242

src/test/resources/logback-test.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
88
<encoder>
99
<pattern>%d %boldCyan(%-5level) %boldGreen(%-15.-15logger{0}) - %msg %n</pattern>
10+
<!--<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{35} - %msg%n</pattern>-->
1011
</encoder>
1112
</appender>
1213

0 commit comments

Comments
 (0)