Filter settings for log (message) output

You can selectively output log (messages) records by message level and message number. By using these settings, you can easily monitor only messages that you want to check.

This section explains the various settings and provides examples of operation.

Filtering by message level

You can set the filtering to output log records to the trace log and syslog based on the message level.

There are three message levels: "Information", "Warning", and "Error".

For details about message levels, refer to the following:

HULFT10 for Linux/AIX Error Codes and Messages : Common header area

Method of setting

Edit the following fields in the System Environment Settings:

  • To specify the message levels for output to the trace log:

    Output to Trace Logs (tracelog)

    The default setting is "001" (Output only Error message level log records).

  • To specify the message levels for output to syslog:

    Output to System Logs (syslog)

    The default setting is "000" (Do not output any message level log records).

For details and examples of the settings of each field, refer to Other Settings.

Note

If settings are made in msgfilter.info (message filter file), they override the settings you have made for each message level. For details about the message filter file, refer to Filtering by message number.

Filtering by message number

You can set the filtering to selectively suppress message output to the trace log and syslog. To do this, write a filter setting separately for each message number.

Describe the filter settings in the file "Message Filter file."

 

This section describes how to configure the Message Filter file.

Note

By using Filtering by message level, you can specify whether to output log records according to message level. However, for messages that are specified in the Message Filter file, the setting of the Message Filter file takes precedence.

File Name

The name of the Message Filter file is "msgfilter.info." You cannot change this name.

The Message Filter file is placed in the path (HULPATH) in which the system file used by HULFT exists.

Description Format

Message_Number tracelog syslog

  • A line with '#' at the beginning is considered as a comment line.

  • Space codes and tab codes at the beginning of each line are skipped.

  • The space code (0x20) or tab code (0x09) is used as the delimiter between fields.

    Even if a space code and a tab code appear consecutively, HULFT considers these codes to be a single delimiter.

  • If there are multiple records with the same message numbers, the last record registered is used.

  • If HULFT detects a record that meets any of the following conditions, HULFT skips the record:

    • The record is written in an invalid format.

    • The message number is invalid.

    • Unallowed characters or numerical values are specified.

Record Layout

msgfilter.info (Message Filter file) does not contain binary data. You can create the file with a text editor such as Notepad. Write a record for each message number. Write one message number per line.

The maximum length of one line (record) is 1,024 bytes.

Explanation of each field

The following provides an explanation of each field.

Message Number

Specify the message number to define.

For details about message numbers, refer to the following:

HULFT10 for Linux/AIX Error Codes and Messages : Common header area

tracelog

Specify whether to output the log records that have the specified message number to the trace log.

0:

Do not output the log records

1:

Output the log records

syslog

Specify whether to output the log records that have the specified message number to syslog.

0:

Do not output the log records

1:

Output the log records

Setting Example

# HULFT10 Message Filter 
# 
#       ID          Message number 
#       tracelog    0: No Output 1: Output 
#       syslog      0: No Output 1: Output 
# 
# ID        tracelog      syslog 
# E1234567  1             0         # This ID is commented out. 
E001002     0             0         # Ignore this message. 
I200789     1             1         # Forcibly output this message to both logs. 
A111111     1             1         # Invalid record 
W001003     9             8         # Invalid record

Operation example

To determine which log (messages) records are output to a log, you can combine the message level filter settings with the message number filter settings.

Outputting only log (messages) records with a specific message number to the trace log

Example

When you do not want to output log (messages) records for all message levels to the trace log and syslog, but you want to output only log (messages) records with the message number "W1002002" to the trace log

  • Specify "000" for Output to Trace Logs (tracelog) and Output to System Logs (syslog) in the System Environment Settings

    tracelog=000 
    syslog=000
    

  • Add a description to msgfilter.info (Message Filter file), to output the messages with the message number "W1002002" to the trace log.

    # HULFT10 Message Filter 
    # 
    #       ID               Message number 
    #       tracelog         0: No Output 1: Output 
    #       syslog           0: No Output 1: Output 
    # 
    # ID            tracelog    syslog 
    W1002002        1            0
    

Suppressing the output of log (messages) records with a specific message number to the trace log and syslog

Example

When you want to output log (messages) records for all message levels to the trace log and syslog, except log (messages) records with the message number "I0001001"

  • Specify "111" for Output to Trace Logs (tracelog) and Output to System Logs (syslog) in the System Environment Settings

    tracelog=111 
    syslog=111
    

  • Add a description to msgfilter.info (Message Filter file), to suppress the output of messages with the message number "I0001001" to the trace log and syslog.

    # HULFT10 Message Filter 
    # 
    #       ID               Message number 
    #       tracelog         0: No Output 1: Output 
    #       syslog           0: No Output 1: Output 
    # 
    # ID            tracelog    syslog 
    I0001001        0            0