What logging level do you use to log messages from automation scripts? Well, your first answer would be the highest level of logging – debug. I used to do the same but in the past couple of months, I have moved from writing logs at debug level to writing them at info level.
If you have not already noticed, in the last year or so, automation script logging has changed in Maximo. Earlier, you could just specify a logger in the code, set that logger to debug in the logging application, refresh the cache and that would start logging your messages in the SystemOut.log. But that doesn’t work anymore. Now you need to set the logging level at the automation script record level for it to log messages from the automation script in the SystemOut.log. And if you set the log level on the automation script record header to DEBUG (because that is what your log statements in the code are using), Maximo starts printing a whole lot of OOB debug information out in the logs. This just makes debugging an issue much more difficult as you need to search for your debug statements in a big pile of debug logs. If it’s a big script or a script that runs on a schedule you are trying to debug, it’s just a nightmare to read the logs.
So, to be able to debug issues without having to unnecessarily scroll through a large pile of logs, I moved to using the info logger level in my automation script code. That way if I set the log level on the automation script record header to INFO and it only prints my log statements and not the OOB debug statement.
Happy days!!
What do you think about this approach? Let me know in the comments.