Programmer Reference : Log4s : Initializing the log4s Framework
Initializing the log4s Framework
The settings for the log4s framework can be entered in the .ini file under the [log4s] stanza or determined programmatically. This allows the user to manipulate the logging of packaged images. Entries in the ini file (or their programmatic equivalents)
control whether any logging is enabled
enable debugging log entries
define any custom Loggers
define Appenders
define filters
use a specific time zone for the timeStamp of the logging event
The formatting of each entry in the ini file must conform to the following rules:
Parameters with a single value take the form parameter=value.
Parameters with multiple values take the form parameter=value1, value2, ... where all value parameters are required.
If a value is a string, single quotes are required only on the pattern string and the socketAppender ip address.
A non-empty stanza must have the following three lines (shown here with the recommended values.)
Common values used to initialize the log4s framework follow:
a string that names the EsLogger, e.g., root or Vast.
one of case insensitive ALL, DEBUG, INFO, WARN, ERROR, FATAL, or OFF.
EsPatternLayout or the string name of one of its user-created sub classes.
a string in single quotes of the conversion specifiers for the EsAppender, e.g., '%d %m'.
true or false.
a string that names the appender, e.g., errorAppender.
a string that names the filter, e.g., infoLevelMatchFilter.
a string specifying the name of a writable file on your system.
specifies whether an existing file should be appended (true) or not (false.)
string in single quotes which specifies either ipAddress or hostName.
the maximum file size in bytes.
the name of a time zone that exists on your system.
the number of times a socket appender will try to establish a connection.
the number of seconds a socket appender will wait between connection retries.
Last modified date: 12/20/2017