NAME

MQSeries::ErrorLog::Entry -- One entry in an MQSeries error-log file

SYNOPIS

#
# Assuming we get an array of parsed MQSeries::ErrorLog::Entry
# objects from somewhere, here's how we dump them to syslog.
#
use Sys::Syslog;
openlog($0, 'pid', 'daemon');

sub process_errorlog_entries {
    foreach my $entry (@_) {
        syslog('info', "$entry"); # Overloaded operator-""
    }
}

DESCRIPTION

The MQSeries::ErrorLog::Entry class is not used directly, but invoked through the MQSeries::ErrorLog::Parser class.

When the MQSeries::ErrorLog::Tail or MQSeries::ErrorLog::Parser classes return an array of entries, these can be queried for their error-codes, summary, parsed fields, etc.

This class has overloaded the '""' (to-string) operator, which means that printing an object results in reasonable results.

METHODS

new

Create a new MQSeries::ErrorLog::Entry object. The parameters are not documented; use the MQSeries::ErrorLog::Parser class to create these.

error_code

Return the error code (e.g., AMQ9001)

timestamp

Return the original time-stamp from the entry, in Unix time() format

summary

Return the original summary

field

Get (one parameter) or set (two parameters) detailed parsed fields, such as 'QMgr', 'Channel', 'Host', etc. See the 'descriptions.pl' files used by the MQSeries::ErrorLog::Parser class for a list of supported messages and the fields parsed.

fields

Get a list of all field names supported by this entry.

as_string

Return a string with the details of this entry; also invoked by the overloaded operator-"".

FILES

The file 'descriptions.pl' contains a list of all error messages supported, in the form of regular expressions and a set of field names extracted from these expressions. Additions and corrections are welcome.

SEE ALSO

MQSeries(3), MQSeries::ErrorLog::Tail(3), MQSeries::ErrorLog::Parser(3)