A broker is automatically configured to save log output to a set of rolling log files. The log files are located in a directory identified by the instance name of the associated broker (see Appendix A, Platform-Specific Locations of Message QueueTM Data):
…/instances/instanceName/log
For a broker whose life cycle is controlled by the Application Server, the log files are located in a subdirectory of the domain directory for the domain for which the broker was started:
…/appServer_domainName_dir/imq/instances/imqbroker/log
The log files are simple text files. They are named as follows, from earliest to latest:
log.txt log_1.txt log_2.txt …log_9.txt
By default, log files are rolled over once a week; the system maintains nine backup files.
To change the directory in which the log files are kept, set the property imq.log.file.dirpath to the desired path.
To change the root name of the log files from log to something else, set the imq.log.file.filename property.
The broker supports three log levels: ERROR, WARNING , INFO. Table 10–2 explains each level.
Table 10–2 Logging Levels
Level |
Description |
---|---|
ERROR |
Messages indicating problems that could cause system failure. |
WARNING |
Alerts that should be heeded but will not cause system failure. |
INFO |
Reporting of metrics and other informational messages. |
Setting a logging level gathers messages for that level and all higher levels. The default log level is INFO, so ERROR, WARNING, and INFO messages are all logged by default.