It's all about the answers!

Ask a question

How do I add logging to an Operation advisor plugin

Aliaksei Gizheuski (23610) | asked May 30 '15, 11:55 a.m.
edited May 30 '15, 1:10 p.m.
Could anyone describe how to use some logging in operation participant plugins? Where and if to put dependencies to logging jars. Where is the logging configuration stored?

By logging I meam log4j framework, but if Jazz uses some other approach please let me know.

Lawrence Smith commented May 30 '15, 12:42 p.m.

Could you change the summary to say something like "How do I add logging to an Operation advisor plugin"? Thanks. 

Accepted answer

permanent link
Lawrence Smith (3764) | answered May 30 '15, 12:38 p.m.
Here is an example

 import org.apache.commons.logging.Log;

import org.apache.commons.logging.LogFactory;


public class MyClass {

  private static final Log fgTraceLogger = LogFactory.getLog("");

  public boolean isOK(boolean isOK)  {

     if (!isOK) {

       fgTraceLogger.debug("Not OK!")


    return isOK;



Now you need to add the following to your file...

After changing the log settings, the following url will reload log settings without reboot:
(this is supposed to work but it didn't for me)

You may also need 

# Default logging is for WARN and higher

log4j.rootLogger=WARN, stdout, file

See also:

Lawrence Smith [IBM]

Ralph Schoon selected this answer as the correct answer

Aliaksei Gizheuski commented May 30 '15, 1:12 p.m.

 Oh, Thanks! I will give it a try.

Ralph Schoon commented May 30 '15, 4:39 p.m.

Great, thanks Lawrence!

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.