cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Workflow robots and conditionals java code debugging

James62
12-Amethyst

Workflow robots and conditionals java code debugging

Hello,

If for example a System.out.println("some text"); line is used within the java code where does the result show up?

5 REPLIES 5

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.

system_out_println-test.PNG

Wouldn't know what's BGMS so i marked Randy's reply as correct.

RandyJones
20-Turquoise
(To:James62)

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).

lmouchard
12-Amethyst
(To:James62)

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

James62
12-Amethyst
(To:lmouchard)

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.

Announcements

Top Tags