Installation guide
Sms4Domino Help
- 107 -
Logging settings
Logging settingsLogging settings
Logging settings
Sms4Domino makes use of the open source library log4
j for all logging
. This framework provides a
very flexible and performant logging system. Plenty of background information is available on the
Internet. We recommend you to visit the web site http://logging.apache.org/log4
j
/1.2/.
As an administrator you have almost full control over what info should be logged and what should be
the output for the logging. We will describe some typical configurations in this help document .
The configuration of log4
j is done via properties files
(text files comparable to notes.ini). Sms4Domino
makes use of Notes documents to define the configuration of the logging. These documents are read
by Sms4Domino and converted into log4
j properties
.
Each Sms4Domino instance requires at least one logging configuration document.
The log settings may be modified at any time. The Sms4Domino command
refresh logging
reads the
updated configuration from the configuration database and modifies the active log4
j settings
accordingly.
Some log
Some logSome log
Some log4
44
4
j concepts
j conceptsj concepts
j concepts
logger: applications that use log4
j direct all logging output to one or more named loggers
.
The logger name space forms a hierarchical system that starts at the top with the root logger.
When an application produces some log info it specifies the name of the logger and the
severity (or log level) of what is being logged. Possible log levels are
FATAL
o
ERROR
o
WARN
o
INFO
o
DEBUG
o
TRACE
o
appender: log4
j directs the output of the log statements to one or more appenders that have
been defined for the logger. Typical appenders write the logging info to the console, a file, the
Windows event manager, Domino logging, ... More than one appender may be linked to a
logger. Multiple loggers may share the same appender.
layouts: the events logged by an application may contain plenty of information: time and date
of the event, Java class name, method name and line number where the event occurred, text
of the event, ... Layouts give you the possibility to format the output. In all following examples
we will use the standard PatternLayout.
Example log
Example logExample log
Example log 4
44
4
j configuration file
j configuration filej configuration file
j configuration file
Let us first have a look to a standard configuration file.
log4
j
.rootLogger=INFO, console1
log4
j
.appender.console1=org.apache.log4
j
.ConsoleAppender
log4
j
.appender.console1.encoding=UTF-8
log4
j
.appender.console1.layout=org.apache.log4
j
.PatternLayout
log4
j
.appender.console1.layout.ConversionPattern=%d{HH:mm:ss,SSS} %m %n
The first line configures the root logger. All log events of level INFO should be written to the
appender called console1. Automatically all log events of level WARN, ERROR and FATAL will
also be logged to the appender. Log events of level DEBUG and TRACE will not be routed to the
appender.
All loggers form a hierarchy. The root logger is sitting at the top. As we enabled the root logger all
other loggers will automatically be enabled for the INFO, WARN, ERROR and FATAL level.
The second line configures the appender called console1. The appender is based on a
ConsoleAppender. This is a standard appender that writes all output to the console. In a