Could anybody say what is the proper way of configuring loggers for Domino REST services? I have studied the code from I have installed "Domino Sample REST Service Feature" from 901v00_11.20141217-1000 version of XPages Extension Library.
As far as I understood logging is done with the help of
import com.ibm.commons.log.Log;
import com.ibm.commons.log.LogMgr;
What I would like to understand is
1) How can I enable the logging and send it to a file and/or console. So far I have enabled logging to console by
LogMgr MyLogMgr = Log.load( "my_rest_service");
java.util.logging.ConsoleHandler CH = new java.util.logging.ConsoleHandler();
MyLogMgr.getLogger().addHandler(CH);
I would very much like to understand how I can do it via a configuration file...
2) To set the logging level and to generate trace entries I used
MyLogMgr.setLogLevel(LogMgr.LOG_TRACEENTRYEXIT_LEVEL);
public ReturnType myFunciton()
{
MyLogMgr.traceEntry(this, "myFunction");
// Function body
MyLogMgr.traceExit(this, "myFunction", functionReturnVariable);
}
What I would like to achieve is one console log handler with one log level, one file log handler with a different log level. Could anybody show me code example of how this could be done?
3) Maybe there is some Domino GUI which allows to set log levels dynamically. If so could anybody share a code sample showing how a Domino Java REST service could "connect" to this GUI...