The Message Logging is divided into 8 levels as listed below
Level | Keyword | Description | 0 | emergencies | System is unusable | 1 | alerts | Immediate action is needed | 2 | critical | Critical conditions exist | 3 | errors | Error conditions exist | 4 | warnings | Warning conditions exist | 5 | notification | Normal, but significant, conditions exist | 6 | informational | Informational messages | 7 | debugging | Debugging messages |
The highest level is level 0 (emergencies). The lowest level is level 7. If you specify a level with the “logging console level” command, that level and all the higher levels will be displayed. For example, by using the “logging console warnings” command, all the logging of emergencies, alerts, critical, errors, warnings will be displayed.
模拟器中的实现: DSW1(config)#logging monitor ?
<0-7> Logging severity level
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)
filtered Enable filtered logging
informational Informational messages (severity=6)
notifications Normal but significant conditions (severity=5)
warnings Warning conditions (severity=4)
xml Enable logging in XML
<cr> 这个等级是0最高,还是7最高? 实验证明:设置为0的时候只显示0的信息,而设置为7的时候,显示所有信息
查找到的资料: 内存缓冲区中的日志信息是临时性的,设备重启或者执行特权用户命令clear logging,缓冲区中的日志信息将被清除。如果要跟踪问题,应该将日志写到扩展FLASH或者发送给Syslog Server。
日志信息分为以下8个级别:
关键字
等级
描述
Emergencies
0
紧急情况,系统不能正常运行
Alerts
1
需要立即采取措施改正的问题
Critical
2
重要情况
Errors
3
错误信息
warnings
4
警告信息
Notifications
5
普通类型,不过需要关注的重要信息
informational
6
说明性的信息
Debugging
7
调试信息
值越小,级别越高,即0级别的信息是最高级别的信息。
当指定设备允许显示的日志信息级别以后,等于或高于所设置值级别的日志信息将被允许显示。
|