Configuring logging
You can configure the logging levels, maximum log file size, and the maximum number of log files that are used by the mqweb server that hosts the IBM® MQ Console and REST API. You can configure logging by using the setmqweb command.
Before you begin
On z/OS®, you must have authority to
run the dspmqweb and setmqweb commands, and write access to
the mqwebuser.xml file.
On all other operating systems, you must be a privileged user.
If the mqweb server is part of a stand-alone IBM MQ Web Server installation, you must have write access to the
mqwebuser.xml file in the IBM MQ Web Server
data directory.
Before you issue either the setmqweb or dspmqweb commands on z/OS, you must set the WLP_USER_DIR environment variable so that the variable points to your mqweb server configuration.
export WLP_USER_DIR=WLP_user_directory where
WLP_user_directory is the name of the directory that is passed
to crtmqweb. For
example:export WLP_USER_DIR=/var/mqm/web/installation1For more information, see Create the mqweb server.
Attention:
Before you issue either the setmqweb or dspmqweb commands in a stand-alone IBM MQ Web Server installation, you must set the MQ_OVERRIDE_DATA_PATH environment variable to the IBM MQ Web Server data directory.
About this task
- console.log and messages.log
- These files contain messages that are issued by the IBM MQ Console, the REST API, and the mqweb server that runs these components.
- trace.log
- This file contains trace for the IBM MQ Console and the REST API. Trace is written to this file only if trace is enabled.
- In an IBM MQ installation:
![[AIX]](ngaix.gif)
On AIX® or Linux®:
/var/mqm/web/installations/installationName/servers/mqweb/logs
On Windows:
MQ_DATA_PATH\web\installations\installationName\servers\mqweb\logs,
where MQ_DATA_PATH is the IBM MQ data
path. This path is the data path that is selected during the installation of IBM MQ. By default, this path is
C:\ProgramData\IBM\MQ.
On z/OS:
WLP_user_directory/servers/mqweb/logswhere WLP_user_directory is the directory that was specified when the crtmqweb script ran to create the mqweb server definition.
In a stand-alone IBM MQ Web Server installation:
MQ_OVERRIDE_DATA_PATH/web/installations/MQWEBINST/servers/mqweb/logswhere MQ_OVERRIDE_DATA_PATH is the IBM MQ Web Server data directory that the MQ_OVERRIDE_DATA_PATH environment variable points to.
- In an IBM MQ installation:
![[AIX]](ngaix.gif)
On AIX or Linux:
/var/mqm/web/installations/installationName/servers/mqweb
On Windows:
MQ_DATA_PATH\web\installations\installationName\servers\mqweb,
where MQ_DATA_PATH is the IBM MQ data
path. This path is the data path that is selected during the installation of IBM MQ. By default, this path is
C:\ProgramData\IBM\MQ.
On z/OS:
WLP_user_directory/servers/mqwebwhere WLP_user_directory is the directory that was specified when the crtmqweb script ran to create the mqweb server definition.
In a stand-alone IBM MQ Web Server installation:
MQ_OVERRIDE_DATA_PATH/web/installations/MQWEBINST/servers/mqwebwhere MQ_OVERRIDE_DATA_PATH is the IBM MQ Web Server data directory that the MQ_OVERRIDE_DATA_PATH environment variable points to.
- REST API, see Tracing the REST API
- IBM MQ Console, see Tracing the IBM MQ Console