How do I add logging to an Operation advisor plugin
Accepted answer
import org.apache.commons.logging.LogFactory;
public class MyClass {
private static final Log fgTraceLogger = LogFactory.getLog("com.ibm.example.logger");
public boolean isOK(boolean isOK) {
if (!isOK) {
fgTraceLogger.debug("Not OK!")
}
return isOK;
}
---
Now you need to add the following to your log4j.properties file...
log4j.logger.com.ibm.example.logger=DEBUG
After changing the log settings, the following url will reload log settings without reboot:
https://server:9443/jts/admin?internal=true#action=com.ibm.team.repository.admin.reloadLogging
(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:
https://jazz.net/wiki/bin/view/Deployment/ManipulatingCLMLog4j
Lawrence Smith [IBM]
Comments
Lawrence Smith
JAZZ DEVELOPER 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.