课程: Linux: Kernels and Logging for System Administration (2017)
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Rotate log files - Linux教程
课程: Linux: Kernels and Logging for System Administration (2017)
Rotate log files
- [Instructor] In a previous video, we looked at the Rsyslog configuration file and learned about rules made up of filters and actions. The filter determines which items in a log file to act upon, and is made up of a facility and priority. An action is what Rsyslog will do. The facility is the subsystem that produces a system message. Facilities can be one of kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, authpriv, ftp, and local0 - local7. The second half of the filter is a priority. Priorities can be one of debug, info, notice, warning, err, crit, alert, and emerg. When a priority is listed, it shows all messages with this priority and higher. In this list, debug is the lowest priority and emerg being the highest. For instance, if we set the priority to warning, it will also show err, crit, alert, and emerg. If I wanted to specify one specific priority, I would use the equal sign before it. For instance, mail.=crit. This would only show critical mail entries, not…