+

Search Tips   |   Advanced Search

Configure binary logging in the Liberty Profile

Use this information as a guide for configuring binary logging in the Liberty profile.

Binary logging provides faster log and trace handling capabilities and more flexible ways to use log and trace content than the default Liberty log and trace framework.

A server configuration consists of a bootstrap.properties file, a server.xml file, and any (optional) files that are included with those files. The bootstrap.properties file specifies properties that need to be available before the main configuration is processed, and are kept to a minimum. The server.xml file is the primary configuration file for the server.

The server.xml file and its associated files use a simple xml format that is suitable for most text editors. A richer editing experience is provided by the eclipse server adapter for Liberty (WAS4D+ adapter), which uses a generated schema to provide drop-down lists of available choices, auto-completion, and other editing tools. For a description of the eclipse server adapter for Liberty, see Edit the Liberty profile configuration using developer tools.

The bootstrap.properties file specifies whether the server should use binary logging as the log and trace framework, or the default log and trace framework.

We can configure binary logging through the server configuration or bootstrap.properties.

We can set Logging properties in either the bootstrap.properties or server.xml. Use attributes in server.xml, or use equivalent properties in bootstrap.properties. Any settings in bootstrap.properties are used from the time the server reads the bootstrap.properties file until the time server.xml is processed. If the logging properties in bootstrap.properties are not replaced or reset in server.xml, the property values in bootstrap.properties will continue to be used.

When binary logging is enabled, the maxFileSize, maxFiles, messageFileName, traceFileName, and traceFormat logging element attributes are ignored (since binary logging runs without trace.log and messages.log files). The traceSpecification, consoleLogLevel and logDirectory attributes continue to be used to set the trace specification, the level for the console log, and the placement of the log and trace files.

If you set logging or binary logging attributes in server.xml, we can avoid changes in configuration between startup time and runtime by setting the corresponding properties in the bootstrap.properties file to the same value. Note that if no logging or binary logging properties are set in bootstrap.properties, the server uses the default logging settings.


Results

After you restart the server, binary logging is enabled and configured.


Parent topic: Binary logging


Parent topic: Administer the Liberty profile manually