log4cplus
process TEST = { service = MLlog4cplus service = MessageLogger { vstring destinations = { "detailedInfo.txt" } PSet log4cplus = { string threshold = "ERROR" } } untracked PSet maxEvents = {untracked int32 input = 5} path p = { myAnalysisModule } module myAnalysisModule = ModuleThatIssuesMessages { } source = EmptySource { } }The service = MLlog4cplus informs the ssytem to attach a destination which will send messages of
log4cplus
.
The PSet log4cplus = {...} configures
that destination, just the same as any other output destination could be
configured.
Note, however, that the vstring destinations = {...}
list
must not
include "log4cplus"
. The contents of that vstring are used to
decide which ordinary file (or cout or cerr) destinations to create and attach.
Some special information pertaining to using log4cplus as a destination for messages:
log4cplus
. For instance,
LogWarning("category")
leads to a LOG4CPLUS_WARN(...)
call.
log4cplus
dispatches to "appenders". For example, a
fileAppender
may be established to write the text to
a file, or a consoleAppender
to write to the job console.
It is up to the user code or configuration file to establish which
appenders are wanted.
MLlog4cplus
service automatically
establishes a fileAppender
writing log4cplus.ouput
.
CMS may decide instead that only appenders explicitly requested should be
established, in which case that automatic appender feature will be removed.
\n
linebreaks, however, these will become part of the message, which will no longer
be a single line.
log4cplus
destination. If a message would not be reported by a
destination configured in that manner,
then no LOG4CPLUS_XXXX(...)
will be called.