Infor Applied Innovation

« | Main | »

Infor Lawson System Foundation Web Services Real-Time Log Filtering

February 3, 2014

By Renan Galang, Lead Software Engineer

In order to properly diagnose client issues, sufficient information must be captured from the target system in order to be analyzed. Most of this information comes in logs. For some issues where the problem only exists on test platforms, gathering the logs is relatively easy. The problem can be easily replicated in isolation, and the logs reconfigured or captured without disturbing the client’s business.

For production systems however, gathering information is more complicated. Some platforms have very few downtimes, offering scant chances to reconfigure the system. In some cases, the system is very busy, which floods the logs with data, making the analysis extremely difficult.

In order to assist in the gathering and analysis of logs, the Infor Lawson System Foundation (LSF) team has rolled out a feature to filter the log output of the LSF web services in real-time. These web services are collectively known as Internet Object Services (IOS). They function as a gateway to the rest of the Infor Lawson System Foundation, processing requests from other web-based Infor Lawson products. Because the majority of Infor Lawson products are now web-based, IOS is where triage activity is usually started, making the contents of its logs crucial in determining the next steps in problem resolution.

To Enable

  1. Disable the ios_logging.properties file in LAWDIR/system by renaming it
  2. Copy the ios_logging.xml file in GENDIR/install to LAWDIR/system
  3. Modify the configuration file to your needs

Configuring the Filters

In addition to the usual information written in Log4J log entries, like date and time stamps, class, and thread name, IOS provides two additional fields: username and servlet. These two fields provide additional context information for the log entry.

The username field is mapped to the user currently logged in, and the servlet field is mapped to the service that is currently executing. The following filters can be used to restrict or allow specific log entries based on the values of these fields. In addition, filters can be combined to produce log output with varying conditions.

Username-based filter

LSFLogFiltering1

The parameter valueToMatch compared with the log’s servlet field, to check if the log entry should be written to the file or not. The parameter denyOnMatch defines the behaviour of the filter.

Log value
valueToMatch
denyOnMatch
Result
lawson lawson true Log entry will not be written to file (discarded)
lawson lawson false Log entry will be written to file
user1 lawson true/false Filter will not run, next filter in chain will decide

 

Shown below are sample IOS log entries. The text highlighted in red is checked by the username filter.

2014-01-27 12:15:16,296 DEBUG [WebContainer : 5] [lawson     ] [ACTION      ] [IOSDBTxManager] Opening DB transaction for user lawson for GEN

2014-01-27 12:15:16,296 DEBUG [WebContainer : 5] [lawson     ] [ACTION      ] [IOSDBTxManager] DB Transaction opened for user lawson for GEN

2014-01-27 12:15:16,297 DEBUG [WebContainer : 5] [lawson      ] [ACTION      ] [PhraseXLTInquirer] inquirePhrasexlt(): retrieving phrasexlt record

 

Servlet-based filter

LSFLogFiltering2

The parameter valueToMatch compared with the log’s servlet field, to check if the log entry should be written to the file or not. The parameter denyOnMatch defines the behaviour of the filter.

Log value
valueToMatch
denyOnMatch
Result
ACTION ACTION true Log entry will not be written to file (discarded)
ACTION ACTION false Log entry will be written to file
ACTION ROUTER true/false Filter will not run, next filter in chain will decide

 

Shown below are sample IOS log entries. The text highlighted in red is checked by the username filter.

2014-01-27 12:15:16,296 DEBUG [WebContainer : 5] [lawson      ] [ACTION     ] [IOSDBTxManager] Opening DB transaction for user lawson for GEN

2014-01-27 12:15:16,296 DEBUG [WebContainer : 5] [lawson      ] [ACTION     ] [IOSDBTxManager] DB Transaction opened for user lawson for GEN

2014-01-27 12:15:16,297 DEBUG [WebContainer : 5] [lawson     ] [ACTION     ] [PhraseXLTInquirer] inquirePhrasexlt(): retrieving phrasexlt record

 

Defining Filter Chains

Filters can be combined in order to create a combined set of conditions before a log entry is written to the disk.

LSFLogFiltering3
The filter chain definition above will only allow log entries from the user user123, or from calls to the FILEMGR service. Everything else will be discarded. Notice the last entry in the filter chain, “DenyAllFilter”. This is a Log4J built-in filter which essentially acts as a wall. Anything that was not explicitly allowed by the previous filters are discarded by this filter.

These filters, in combination with the Level-based logging of Log4J allows support and development engineers to produce logs with increased logging definition (DEBUG or greater), but narrower scopes. This is especially useful for production systems, where it is now possible to turn up logging to higher levels, but restricting it for only a specific user. This contributes to expedited problem analysis and resolution.

Comments

4 responses to “Infor Lawson System Foundation Web Services Real-Time Log Filtering”

  1. Gary Padgett says:

    Great article, but I have a question – when I copy the ios_logging.xml to LAWDIR/system, do I rename it to ios_logging.properties or leave it as ios_logging.xml? I assume not, but wanted to check. And it is not necessary to stop and restart IOS?

  2. Brian Vanderhyde says:

    What version, service pack, and/or patch is required to get the new logging features?

  3. Renan Galang says:

    @Gary Padgett
    Hi Gary,
    Leave it as “ios_logging.xml”. It will take over as your log configuration file. Anything you can configure in ios_logging.properties, you can do in the XML file as well. When transitioning to the XML file, it is necessary to restart the application server. After that however, any changes to the contents will be picked up by the system. It polls the file every 5 minutes, no need to restart. Thanks!

  4. Renan Galang says:

    @Brian Vanderhyde
    Hi Brian!
    It will be part of the upcoming LSF 901 service pack 13. It is also already part of LSF 10 service pack 4. As a patch it is available for the following releases:
    LSF 901 Service Pack 9 up to 11
    LSF 10 Service Pack 1 up to 3
    Thanks!

Leave a Reply to Gary Padgett Cancel reply

Your email address will not be published. Required fields are marked *



About this Blog

The latest innovations using Infor Technology