IBM Support

Adding classname and line information to maximo logs

Troubleshooting


Problem

This document provides some info on how you can add classname and line information to the output, for better troubleshooting on maximo log files

Resolving The Problem

For any Maximo 6.x environment the default logging.properties file is configured for a production environment. In Maximo 7.x you can change that in Logging application.

At our development environment we can add more details to the log messages:

For Maximo 6.x :

Open the file: <MAXIMO_FOLDER>\applications\maximo\properties\logging.properties

Change the ConversionPattern to ConversionPattern=%d{HH:mm:ss} %-5p %m (%C %L) %n
Also do it in the ConsoleAppender and RollingFileAppender
This way, the log messages will show the class and the line where log was triggered.

Results in the log will be something as:

Example: 16:49:12 ERROR Hello logging! (psdi.app.actionscfg.Test 28)

You will need to rebuild, redeploy EAR files and restart Maximo.


For Maximo 7.x :

You can perform that action on the Logging application, by updating the Conversion Pattern field from the Manage Appenders dialog box.
In the example below we just added %C and %L parameters.
Results in the log will be something as:

Example: 16:49:12 ERROR Hello logging! (psdi.app.actionscfg.Test 28)



Should you need any assistance please contact IBM Maximo Support

[{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0;6.1;6.2;6.2.1;6.2.2;6.2.3;6.2.4;6.2.5;6.2.6;6.2.7;6.2.8;7.1;7.1.1;7.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
17 June 2018

UID

swg21504659