The product has a unified logging component that handles messages that are written by the product and provides First Failure Data Capture (FFDC) services.
Additionally, the logging component captures messages that are written to System.out, System.err, java.util.logging, and OSGi logging. The logging component unifies the handling of these messages with other messages written by the product. The logging component is not capable of capturing messages that are written directly by the JVM process, such as -verbose:gc output.
Attribute | Equivalent property | Description |
---|---|---|
logDirectory |
|
This attribute sets the directory for all
log files, including FFDC. Note: By default,
logDirectory is set to the
LOG_DIR environment variable. The
LOG_DIR environment variable is set to
WLP_OUTPUT_DIR/serverName/logs
by default.
|
maxFileSize |
|
The maximum size (in MB) that a log file
can reach before being rolled. The Liberty profile runtime only does
size-based log rolling. To disable this attribute, set the value to 0.
The maximum file size is approximate. By default, the value is
20. Note: maxFileSize does not apply to the
console.log file.
|
maxFiles |
|
If an enforced maximum file size exists,
this setting is used to determine how many of each log file are kept.
This setting also applies to the number of exception logs that summarize
exceptions that occurred on any particular day. So if this number is 10,
you might have 10 message logs, 10 trace logs, and 10 exception summaries
in the ffdc/ directory. By default, the value is
2. Note: maxFiles does not apply to the
console.log file.
|
consoleLogLevel |
|
This filter controls the granularity of
messages that go to the console.log file. The valid
values are INFO, AUDIT,
WARNING, ERROR, and
OFF. By default, the level is
AUDIT. ![]() |
copySystemStreams |
|
If true, messages written to the System.out and System.err streams are copied to console.log. If false, those messages are written to configured logs such as messages.log or trace.log, but they are not copied to console.log. The default value is true. |
messageFileName |
|
The message log has a default name of messages.log. This file always exists, and contains INFO and other (AUDIT, WARNING, ERROR, FAILURE) messages in addition to System.out and System.err. This log also contains time stamps and the issuing thread ID. If the log file is rolled over, the names of earlier log files have the format messages_timestamp.log |
suppressSensitiveTrace | The server trace can expose sensitive data when tracing untyped data, such as bytes received over a network connection. This attribute, when set to true, prevents potentially sensitive information from being exposed in log and trace files. The default value is false. | |
traceFileName |
|
The trace.log file is only created if additional or detailed trace is enabled. stdout is recognized as a special value, and causes trace to be directed to the original standard out stream. |
traceSpecification |
|
The trace string is used to selectively enable trace. The default is *=info. |
traceFormat |
|
This attribute controls the format of the trace log. The default format for the Liberty profile is ENHANCED. You can also use BASIC and ADVANCED formats as in the full profile. |
<logging traceSpecification="*=audit:com.myco.mypackage.*=debug"/>
For details of the trace specification format, see Log level settings.
com.ibm.ws.logging.max.file.size=1
com.ibm.ws.logging.max.files=3
com.ibm.ws.logging.console.log.level=OFF
com.ibm.ws.logging.message.file.name=loggingMessages.log
The
console.log file is reset when the server is restarted.