• Understanding Logging Levels

 
 
Print Friendly, PDF & Email

Overview

 

EOS generates a number of logs to notify various events such as interface going down,spanning-tree state change, agent restart, bgp neighborship flap etc.

One event can be more impacting than other and thus it is necessary that respective logs reflect that severity.

This is why all the logs are categorized into different severity/logging levels.

There are 8 logging levels available, from 0-7, 0 being most critical and 7 being least critical.

  alerts         Immediate action needed           (severity=1)

 critical       Critical conditions              (severity=2)

 debugging      Debugging messages                (severity=7)

 emergencies    System is unusable                (severity=0)

 errors         Error conditions                  (severity=3)

 informational  Informational messages            (severity=6)

 notifications  Normal but significant conditions (severity=5)

 warnings       Warning conditions                (severity=4)

 
Logs are in the following format.

 

timestamp hostname process: [seq number:] %FACILITY-Severity-Mnemonic: Message text

 

For example,

 

 May 23 19:55:32 switch1 Stp: %SPANTREE-6-INTERFACE_ADD: Interface Ethernet3/1 has been added to instance Vl1600

Severity specifies logging level.For example, in the above log logging level/severity is 6 i.e it is just a informational message.

Configuring Logging levels

Separate logging levels can be configured for each facility or same logging level can be configured for all the facilities.By default, logging level for all the facilities is 7(debugging).

A very important point to note is that when logging level for a facility is set then all the logs of that severity and higher are logged.

Logs of that facility with lower severity are not logged.

For example, if logging level of bgp facility is set to errors(3) then all the logs with severity 3 and above (i.e severity 2,1,0) will be logged. Logs with severity 7,6,5 and 4 will not be logged.

The logging level can be modified by running following command.

switch1(config)# logging level bgp errors

 This will set logging level of bgp facility to errors.

switch1(config)# logging level bgp errors

 To change logging level of all the facilities at one go, you need to run

switch1(config)#logging  level all ?

 alerts         Immediate action needed           (severity=1)

 critical       Critical conditions               (severity=2)

 debugging      Debugging messages                (severity=7)

 emergencies    System is unusable                (severity=0)

 errors         Error conditions                  (severity=3)

 informational  Informational messages            (severity=6)

 notifications  Normal but significant conditions (severity=5)

 warnings       Warning conditions                (severity=4)

 

Below command shows logging level of all the facilities and will reflect modified logging levels.

 

switch1#show logging       

Syslog logging: enabled

<snip>

Facility                   Severity Effective Severity

--------------------       ------------- ------------------

aaa                        debugging debugging    

accounting                 debugging debugging    

acl                        debugging debugging    

agent                      debugging debugging    

ale                        debugging debugging    

arp                        debugging debugging    

bfd                        debugging debugging    

bgp                        debugging debugging    

bmp                        debugging debugging    

capacity                   debugging debugging    

capi                       debugging debugging    

clear                      debugging debugging    

cvx                        debugging debugging    

dataplane                  debugging debugging    

dhcp                       debugging debugging    

dot1x                      debugging debugging    

dscp                       debugging debugging    

envmon                     debugging debugging    

eth                        debugging debugging

  

 

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: