exclude Logs all categories to system log except the listed categories;
all other categories are logged unless specifically excluded by issuing
this command again.
Issuing an include command after an exclude command (or vice versa)
overrides the earlier command. Therefore, you cannot enter a command
including certain categories and then follow it with a command excluding
others. Similarly, you cannot enter a command excluding certain categories
and then follow it with a command including others.
You can issue successive include commands or successive exclude
commands; in this case, the successive commands expand the list of included
or excluded categories.
Example 1 The first command causes only the osfpGeneral, mplsGeneral, and
os event categories to be logged to system log at 10.10.9.5. The second command
reverses this inclusion and restores the logging of all event categories.
host1(config)#log destination syslog 10.10.9.5 include ospfGeneral
mplsGeneral os
host1(config)#no log destination syslog 10.10.9.5
Example 2 The first command again causes only the osfpGeneral, mplsGeneral,
and os event categories to be logged to system log at 10.10.9.5. The second
command reverses the inclusion of ospfGeneral and os. The mplsGeneral category
is still included and is thus the only category logged.
host1(config)#log destination syslog 10.10.9.5 include ospfGeneral mplsGeneral
os
host1(config)#no log destination syslog 10.10.9.5 include ospfGeneral os
Example 3 The first command causes the isisGeneral, ipRoutePolicy, and
ipTraffic event categories to be excluded from logging to system log at 10.1.2.3.
The second command reverses this exclusion and restores the logging of all
event categories.
host1(config)#log destination syslog 10.1.2.3 exclude isisGeneral ipRoutePolicy
ipTraffic
host1(config)#no log destination syslog 10.1.2.3 exclude
Example 4 The first command again causes the isisGeneral, ipRoutePolicy, and
ipTraffic event categories to be excluded from logging to system log at 10.1.2.3.
The second command reverses the exclusion of ipRoutePolicy and ipTraffic. The
isisGeneral category is still excluded; all other events are logged.
host1(config)#log destination syslog 10.1.2.3 exclude isisGeneral
ipRoutePolicy ipTraffic
host1(config)#no log destination syslog 10.1.2.3 exclude isisGeneral
Example 5 The first command causes the isisGeneral event category to be
excluded from logging to system log at 10.1.2.3. The second command causes
ospfGeneral to also be excluded from logging.
host1(config)#log destination syslog 10.1.2.3 exclude isisGeneral
host1(config)#log destination syslog 10.1.2.3 exclude ospfGeneral
Chapter 1: System Logging Overview
Configuring Event Logging
7
Need help?
Do you have a question about the JUNOSE 11.1.X - SYSTEM EVENT LOGGING REFERENCE GUIDE 3-24-2010 and is the answer not in the manual?