Console.log in Java extension?
![]() Greetings, When "developing" javascripts within RTC, I find the console.log method to be very handy. What is the best "printf" method of debugging I can use from within an extension? I have a working Operation Advisor, but am now adding functionality to it and a piece is not working properly and I'd rather just use prints than debugging with Jetty at this point. Thanks! |
Accepted answer
![]()
You can use below statements to get the Log instance which will log the statements you want in ccm,log.
import org.apache.commons.logging.Log;
import com.ibm.team.repository.common.LogFactory;
private static final Log fLog= LogFactory.getLog("<Logger.Name>");
You can use fLog.debug to this instead of sysout.
You can control the log level from the log4j.properties in server\conf\ccm
log4j.logger.<Logger.Name>=debug
Dave Evans selected this answer as the correct answer
|