Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello,
If for example a System.out.println("some text"); line is used within the java code where does the result show up?
Look in your BGMS log file. All workflow tasks run on the BGMS and will therefore print out to that log file.
It's there. Thanks.
Wouldn't know what's BGMS so i marked Randy's reply as correct.
James62 wrote:
Hello,
If for example a System.out.println("some text"); line is used within the java code where does the result show up?
In the method server or background method server logs. For a workflow this will show up in the background method server log (if you have a background method server configured).
Hi James,
the method server uses log4j. The default configuration file for logging (log4MethodServer.properties) redirects the standard outputs to the log file of the method server. See:
log4j.rootLogger=ERROR, stdout, methodServerLogFile, MiscLogEvents
If you are familiar to the use of log4j, you can quite easily configure a new logger for log4J and use it in Java, with different levels (for ex: ERROR, WARNING, INFO, DEBUG)
In your java code, you'll have something like :
org.apache.log4j.Logger LOGGER = Logger.getLogger(YourOwnClass.class);
LOGGER.debug("some text");
LOGGER.warn("some warning");
Configure logger in the log4j property file (log4MethodServer.properties), you then have to define a logger as following, and can change the level without changing your code.
log4j.logger.your.own.package=DEBUG, methodServerLogFile
(replace with your package)
Regards,
Loic
Hi,
"YourOwnClass.class"? "replace with your package"?
Sadly, i have no idea what any of that means, but luckily I'm done with this project and i actually succeeded. Let's just hope i won't touch workflows for a while now.
You should know this didn't fall on fertile land, but thanks anyway.