Modifying logging

Use the loggerAdmin.sh script to modify logging files. Logging for the Netcool Configuration Manager Core and User Interface is controlled by the loggerAdmin.sh script, which is located in /opt/IBM/tivoli/netcool/ncm/bin. To avoid performance issues, you must switch back to normal logging levels after using debug levels.

Syntax

loggerAdmin.sh [-a] [-c <arg>] [-h] [-i <arg>] [-l <arg>] [-o <arg>] [-p <arg>] [-q] [-r] [-s
    <arg>]

Parameters

-a,--set
Set value
-c,--component <arg>
The specific component logging to change. If not specified, then the default is changed.
-h
Help
-i,--initialize <arg>
The initialize command reads a local log4j configuration file, and then sends it to the remote server to configure the logging.
Reset to configuration using the specified file. Must be followed by one file name.
-l,--level <arg>
Set logging level. No effect for get command.
Must be one of 'TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', or 'FATAL'.
If not specified, resets to the current default value.
-o,--output <arg>
Output file.
If not specified, writes to standard out.
-p,--port <arg>
The port to be used for the specified server.
Not applicable if 'server' is not specified.
-q,--query
Query values.
If 'server' is not specified, then either a list of servers will be generated, or a list of configuration options for the server will be generated.
-r,--reset
The reset command resets the logging configuration to the initial startup settings.
-s,--server <arg>
The specific server or servers change.
If not specified, then all servers are changed.
Note: A command must contain one, and only one, 'query', 'set', 'reset', or 'initialize' operation.

Examples

The following example sets the server to DEBUG logging
loggerAdmin.sh -a -l DEBUG -s url.for.server
The following example sets the logging level for all com.intellliden.data access classes, and all classes in the sub packages to DEBUG
loggerAdmin.sh -a -l DEBUG -c com.intelliden.dataaccess -s url.for.server
    
The following example configures the logging server based on the contents of the myConfig.file
loggerAdmin.sh -s url.for.server -i myConfig.file
Warning: You must switch back to normal logging levels after using debug levels, to avoid performance issues.

Presentation server logging

The presentation server logs all information to the WebSphere Application Server (WAS) logging system.

This allows the WAS console to adjust the logging and logging output of the presentation server(s) on demand, and while the systems executes.

Compliance server logging

The compliance server uses Log4J, and the logging configuration is specified in a standard Log4J configuration file stored in the following location: <InstallDir>/compliance/config/properties/logging/log4j.properties

Note: From FP16 onwards, the configuration file is stored in the following location: <InstallDir>/compliance/config/properties/logging/log4j2.properties

To change the logging levels and other settings, you modify the file, then stop and restart the server.

Worker server logging

The worker server uses Log4J and has a default configuration file stored in the following location: <InstallDir>/config/properties/logging/log4j.properties.

Note: From FP16 onwards, the configuration file is stored in the following location: <InstallDir>/config/properties/logging/log4j2.properties

After the log file reaches a certain size, a new log file is created. To configure the maximum size of a log file, set the log4j.appender.FILE.MaxFileSize property, as shown in the following example:

# Set the maximum file size before rollover
log4j.appender.FILE.MaxFileSize=5MB
Note: From FP16 onwards, change the below parameter.
appender.rolling.policies.size.size=3MB

To configure how many log files are created before the first file is overwritten, set the log4j.appender.FILE.MaxBackupIndex property, as shown in the following example:

# Set the backup index
log4j.appender.FILE.MaxBackupIndex=10
Note: From FP16 onwards, change the below parameter.
appender.rolling.strategy.max=10
Important: The worker has an embedded logging server that allows dynamic reconfiguring of the logging without stopping and starting the server. However, the dynamic changes will be reset to the defaults when the server is restarted.

Driver logging

Driver logging occurs in the logs of the system that made the call to the driver. For example, if a worker server calls the driver code, then the driver logging will be in the Worker server logs.

To increase logging to debug levels for troubleshooting and log collection by the support teams, change to the /bin directory within the installation directory and run the following statements as the same user that installed Netcool Configuration Manager:

./loggerAdmin.sh -a -l TRACE -c com.ibm.tivoli.ncm.drivers.utils
./loggerAdmin.sh -a -l TRACE -c com.intelliden.icos.util.handlers
./loggerAdmin.sh -a -l TRACE -c com.intelliden.icos.irm.PhysicalDevice
./loggerAdmin.sh -a -l TRACE -c com.intelliden.icos.util.socket
./loggerAdmin.sh -a -l TRACE -c com.intelliden.icos.util.socketSSH2Wrapper
./loggerAdmin.sh -a -l TRACE -c com.intelliden.icos.util.socket.ComWrapper
./loggerAdmin.sh -a -l TRACE -c com.ibm.tivoli.ncm.drivers.comms.socket.SSH2IO
./loggerAdmin.sh -a -l TRACE -c com.intelliden.icos.util.socket.TelnetIO
./loggerAdmin.sh -a -l TRACE -c com.intelliden.icos.util.DeviceComInterfaceFactory
./loggerAdmin.sh -a -l TRACE -c com.intelliden.icos.irm.PhysicalDeviceFactory
./loggerAdmin.sh -a -l TRACE -c legacy.com.intelliden.icos.util.handlers     
./loggerAdmin.sh -a -l TRACE -c legacy.com.intelliden.icos.util.socket
./loggerAdmin.sh -a -l TRACE -c com.intelliden.drivers.omnidriver

To reset the logging levels when you no longer need them to be at debug level, run the following commands:

./loggerAdmin.sh -a -l ERROR -c com.ibm.tivoli.ncm.drivers.utils
./loggerAdmin.sh -a -l ERROR -c com.intelliden.icos.util.handlers
./loggerAdmin.sh -a -l ERROR -c com.intelliden.icos.irm.PhysicalDevice
./loggerAdmin.sh -a -l ERROR -c com.intelliden.icos.util.socket
./loggerAdmin.sh -a -l ERROR -c com.intelliden.icos.util.socketSSH2Wrapper
./loggerAdmin.sh -a -l ERROR -c com.intelliden.icos.util.socket.ComWrapper
./loggerAdmin.sh -a -l ERROR -c com.ibm.tivoli.ncm.drivers.comms.socket.SSH2IO
./loggerAdmin.sh -a -l ERROR -c com.intelliden.icos.util.socket.TelnetIO
./loggerAdmin.sh -a -l ERROR -c com.intelliden.icos.util.DeviceComInterfaceFactory
./loggerAdmin.sh -a -l ERROR -c com.intelliden.icos.irm.PhysicalDeviceFactory
./loggerAdmin.sh -a -l ERROR -c legacy.com.intelliden.icos.util.handlers     
./loggerAdmin.sh -a -l ERROR -c legacy.com.intelliden.icos.util.socket
./loggerAdmin.sh -a -l ERROR -c com.intelliden.drivers.omnidriver
Note: This does not include any output that the driver sends to System.out or System.err