Logging message in RTC server plug-in static block
I have a static block in one of my RTC server plug-in classes in which I would like to write a message to ccm.log. How do I obtain the RTC server Log class in the static block? Or is there some other way of logging messages in the static block?
|
Accepted answer
The server is using org.apache.commons.logging, you can get a logger using the static
Log log = LogFactory.getLog(YourClass.class); By default I believe this will log to the server/logs/jazz.log file. Logging settings are in server/conf/jazz/log4j.properties if you want to add specific rules for YourClass. Geoff Alexander selected this answer as the correct answer
Comments Thanks Andrew. Your answer solved my problem.
scott herzinger
commented Jan 07 '13, 1:28 p.m.
I have a similar need. My plugins extend AbstractService. Any comments on whether using AbstractService.getLog() is a good idea or not? It already appears to know how to find the componentId.
|
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.