Agent Logging Fundamentals
The default Agent logger is defined in the file <installdir>\conf\loggers.xml. Let’s examine this file:
<loggers xmlns="http://www.roguewave.com/rwsf/loggers">
<!-- To stdout --> 1
<logger name="stdout.info" class="rwsf_core.createLogLevelFilter">
<property name="logger" value="stdout"/>
<property name="filter" value="info"/>
</logger>
<!-- To the file agent.log --> 2
<!--logger name="rwsf.agent.logfile"
class="rwsf_core.createRotatingFileLogger">
<property name="filename" value="${RWSF_HOME}/logs/agent.log"/>
<property name="formatter" value="rwsf_core.createLogTimeFormatter"/>
<property name="mode" value="append"/>
<property name="measurement" value="mb"/>
<property name="measuresize" value="1"/>
<property name="cleanup" value="y"/>
<property name="logfilenum" value="10"/>
<property name="logdir" value="${RWSF_HOME}/logs"/>
</logger-->
<logger name="rwsf.agent.logfile" class="rwsf_core.createFileLogger"> 3
<property name="filename" value="${RWSF_HOME}/logs/agent.log"/>
<property name="formatter" value="rwsf_core.createLogTimeFormatter"/>
<property name="mode" value="overwrite"/>
</logger>
<!-- Filter the previously created file logger. --> 4
<logger name="rwsf.agent.logfile.verbose"
class="rwsf_core.createLogLevelFilter">
<property name="logger" value="rwsf.agent.logfile"/>
<property name="filter" value="verbose"/>
</logger>
<!-- Create logger that writes to two locations --> 5
<logger name="rwsf.agent.log" class="rwsf_core.createLogSplitter"
default="true">
<property name="logger1" value="stdout.info"/>
<property name="logger2" value="rwsf.agent.logfile.verbose"/>
</logger>
</loggers>
The defined log levels are:
NONE | No logging |
FATAL | Fatal messages only |
ERROR | Error and Fatal |
WARN | Warn, Error, and Fatal |
INFO | Info, Warn, Error, and Fatal |
VERBOSE [default] | Verbose, Info, Warn, Error, and Fatal |
DEBUG | Debug, Verbose, Info, Warn, Error, and Fatal |
The default Agent logger is set to VERBOSE.