Implementing logging in server side extension
Accepted answer
You have to add the following part of the code to your plugin:
import org.apache.commons.logging.LogFactory;
...
private static final Log logger = LogFactory.getLog("com.myCompany.MyClassName");
...
logger.debug("Debug information");
logger.error("Error information");
If you want to change log level, you need to modify log4j.properties:
log4j.logger.com.myCompany.MyClassName=DEBUG.
One other answer
Hello Ralph,
I need to add loggers at server side. However there's no log4j.properties file. There's log4j2.xml file. Here it captures only log.error statements. I need to capture log.info or log.debug statements.
Thanks in Advance,
Vinilda