Configuration Syntax
The application-log accessor accepts a configuration
argument.
If omited the configuration argument defaults to
the resource addressed by the uri ffcpl:/etc/LogConfig.xml
.
The accessor will
fail if no configuration argument can be found.
Unusually, the configuration is only read once; changes, once accessed,
are not detected, and so you must restart to change configuration settings.
The configuration resource must be an XML fragment of the form:
<log>
<name>my-unique-log-name</name>
<destination>log/my-log-%g.log</destination>
<limit>131072</limit>
<count>2</count>
</log>
The name
element within the configuration argument is a system unique identifier
used to locate logs.
The JDK documentation
recommends using the full package name of the subsystem.
Within NetKernel this could be the URI of the module.
The destination
element within the configuration argument is a filesystem path
which is used to specify the filename of the log.
Optional
%g wilcards are permitted as per
FileHandler javadoc
.
The filename may be relative and in which case it will be resolved against the NetKernel basepath as
specified in system.xml
.
The limit
element within the configuration argument specifies
the maximum filesize in bytes of a logfile before it will be closed.
The count
element within the configuration argument specifies the number of log files
to be used in rotation (use %g wildcard to make each one unique.)