28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.2 Limiting the Messages Collected<br />

Problem<br />

You have turned on system logging and are collecting messages from all facilities in<br />

your logging files. You are not interested in the messages from one or two of the<br />

facilities and would like to stop messages from these facilities without configuring<br />

each priority.<br />

Solution<br />

Disable the facilities that you don’t want showing up in your logfile:<br />

[edit system syslog file messages]<br />

aviva@router1# set any notice<br />

aviva@router1# set interactive none<br />

<strong>Discussion</strong><br />

When you want to capture logging messages from all sources on the router, you can<br />

configure this easily with a single command that specifies the facility as any. When<br />

you want to capture all facilities but one or two, the quickest way is to disable the<br />

facilities that you are not interested in. In this case, you are not interested in collecting<br />

any of the commands that users type at the CLI, but you do want any other commands.<br />

These two commands are a shortcut that saves you from having to type 10<br />

commands, one for each facility you want to enable.<br />

5.3 Including the Facility and Severity in Messages<br />

Problem<br />

Your system logfiles contain lots of messages, and you want to use the severity levels<br />

to distinguish the important ones from the informational ones.<br />

Solution<br />

Include the severity level in each logging message:<br />

[edit system syslog file messages]<br />

aviva@router1# set explicit-priority<br />

<strong>Discussion</strong><br />

When you configure each system logfile and include the explicitly-priority statement,<br />

all system log messages contain the priority, which is a combination of the<br />

facility and severity level. The following example highlights the priority for messages<br />

in the logfile.<br />

Including the Facility and Severity in Messages | 167<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!