I have our build creating plugins with all the proper version and qualifier info for equinox.p2,
The plugins deploy from “dropins” in the black box knime and run.
And I have a script to launch knime and connect remote debugging to it and all debugger functions work on our plugins, breakpoints etc. For testing I used the sample NumberFormatter where I changed the package and symbolic names to another package.
It seems I have just one nut left in I have not been able to see where-how to configure the logger “NodeLogger” and/or log4j or get access to stdout for knime.exe
I put the line
-Dlog4j.configuration=C:/Program Files/KNIME/didiLog4j.properties
in the knime.ini file ( does the path need to be in another format or ? ) no startup errors were reported. I saw a post about doing this to direct it to a different log4j.properties.
didiLog4j.properties contains:
# $Id: log4j.properties 3842 2009-02-09 00:27:43Z peterk $
#
log4j.rootLogger=info, A1
# Appender A1 writes to stdout…
#
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
# format for “clickable” log entries in the intellij debug console
# log4j.appender.A1.layout.ConversionPattern=at %c.%M(%F:%L), %m%n
log4j.appender.A1.layout.ConversionPattern=%-17c{2} (%13F:%L), %m%n
# log4j.appender.A1.layout.ConversionPattern=%d %-5p [%t] %-17c{2} (%13F:%L) %3x - %m%n
log4j.logger.com.artd=debug
log4j.logger.com.didi=debug
In my test plugin I have in the “NodeModel” class, the lines:
private static final NodeLogger LOGGER = NodeLogger.getLogger(NumberFormatterNodeModel.class);
private static final Logger log = Logger.getLogger(NumberFormatterNodeModel.class);
and this in the “execute” method.
LOGGER.info(“This is an example info.”);
log.debug(“a post to log4j in KNIME”);
System.out.println(“println from knime plugin”);
The plugin loads and ruins, and when executed hits a breakpoint I put in the execute method and I can step through the above calls.
When knime.exe is run from the command line nothing appears on the console that it is run from and nothing appears in any of the consoles in knime itself. ( this is all in windows 10-pro BTW )
I tried it with each type of print independently and then all at once, it doesn’t work in any case.
Basically I need to know how to enable logging either to the console or to a file which I can put a “tail” on.
PK