The jlog.logger.level property in the jlog.properties file can be used to set the desired trace level. The trace level can be set to any of the following JLOG log level (hierarchy, from most severe to least severe):
The default level is FATAL.
Default Trace level as well as whether Tracing is done to file or memory is defined in the default jlog.properties file. This file is placed in the TDI_install_dir/etc folder. If we use a solution directory, it is placed in the TDI_Solution_dir/etc folder.
TDI ships a LogCmd.bat (for Windows) and LogCmd.sh (for Unixes) scripts. By using them the Trace properties can be set dynamically. JLOG logger starts a command server on the default port (9992) to listen for log commands sent by the logcmd command line utility.
For the logcmd scripts to work, the command server needs to be started first. To start the log command server, we need to set jlog.noLogCmd=false in the jlog.properties file.
The listen port of this server can be changed by setting the jlog.logCmdPort property in the jlog.properties file to the desired value. For more information about these properties read the comments in the jlog.properties file.
Usage of the logcmd command is as follows:
logcmd -o port_number { [-h] | [help] |
[list {node_name} ] |
[config node_name] |
[set node_name key_name=value |
[remove node_name {key_name} ] |
[dump handler_name] | [save {all} ] }
where
Property | Value | Description |
---|---|---|
jlog.snapmemory.queueCapacity | Default 10000 | The number of logevents that can be stored in the snapmemory handlers queue. |
jlog.snapmemory.dumpEvents | true | The handler immediately sends all the queued events to its output listeners when the property is set to true. The property can then be reset to false. |
jlog.snapmemory.userSnapDir | CTGDI/FFDC/user/ | The directory to place the trace dump file when a user triggers an FFDC action by using the logcmd scripts. |
jlog.snapmemory.isSync | Default false | The log events are dumped to the snap shot file synchronously when the property is set to true. This does not spawn a new thread, and causes the logger to block until the snapshot is complete. |
jlog.snapmemory.userSnapFile | userTrace.log | |
jlog.snapmemory.triggerFilter | jlog.levelflt | The level filter to be used to take JFFDC action. |
jlog.snapmemory.msgIds | *E | The TMSXML message filter to be used for JFFDC action. |
jlog.snapmemory.mode | PASSTHRU or BLOCK. Default is PASSTHRU. | The listed IDs are blocked when the msgIDs property is set to BLOCK. When set to PASSTHRU, the listed IDs are sent to the filter. |
Jlog.snapmemory.msgIDRepeatTime | 10000 (in milliseconds) | The minimum time in milliseconds, after passing a logEvent with a given TMS message ID, before another logEvent with the same id can be passed. |
The default value for jlog.snapmemory.triggerFilter sets up a trigger filter named jlog.levelflt. An attribute of such a filter is the message severity, which takes one of the JLOG Log values as described above. By default, the entries
jlog.levelflt.className=com.ibm.log.LevelFilter jlog.levelflt.level=FATAL
set up the FFDC code to cause the memory buffer to be dumped to the trace log when a trace message of severity FATAL occurs. The jlog.levelflt.level property can take any of the other Log level values as well, but only values of ERROR or FATAL make much sense as otherwise the amount of FFDC dumping is very high, causing huge slowdowns of the TDI Server.