My Oracle Support Banner

How to Parse XML Log Files (Doc ID 1995475.1)

Last updated on MAY 28, 2021

Applies to:

Oracle Communications Messaging Server - Version 6.3 and later
Information in this document applies to any platform.


The MTA's transaction log files, mail.log_current, et. al, can be difficult to parse automatically. Some fields are simply null if they have no value. Different types of log entries have very similar but different information in different columns. This makes column-based parsing (ie cut or awk) difficult.

The log_format options 2 and 3 mitigate that somewhat, but it is still very painful if you enable additional logging which changes the layout of the mail.log* records.

Starting in Messaging Server 6.3, log_format=4 causes the MTA to use an XML-compatible format. This format is somewhat more cumbersome for a person to browse, but provides a structure which can be consistently parsed by a program. The question then is: what tools are available to parse this XML format log file?

Troubleshooting Steps

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document
Troubleshooting Steps
 Your existing log file storage/analysis system
 Import into a database
 XML-Compatible, but...
 PHP has XML support
 Summarize J failures
 Summarize incoming connection rates

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.