logging facility & trap

device(config)#logging facility local4

//facility
标识 , RFC3164 规定的本地设备标识为 local0 - local7

这个是对设备的重要性进行标识而已,跟日志本身没有关系,用默认的 local7 即可 .

syslog
要考虑的主要是哪些日志需要发送到日志服务器上,即日志等级,使用如下命令:
device(config)#logging trap warning //
日志记录级别,可用 "?" 查看详细内容
• emergency―Logs only emergency events.
• alert―Logs alert and more severe events.
• critical―Logs critical and more severe events.
• error―Logs error and more severe events.
• warning―Logs warning and more severe events.
• notice―Logs notice and more severe events.
• informational―Logs informational and more severe events.
• debug―Logs all events, including debug events.
为了防止日志量太大,一般设置成 warning 就行了。

你可能感兴趣的:(职场,logging,trap,休闲,facility)