1. Modify /etc/syslog.conf. Local0-local7 users can customize. Here is an example:
* .info; mail.none; authpriv.none; cron.none; local3.none; local4.none; local5.none; local6.none / var / log / messages
# The Authpriv File Has RESTRICTED Access.
Authpriv. * / var / log / secure
# Log all the mail message. In one.
Mail. * / var / log / maillog
# Log cron stuff
Cron. * / var / log / cron
# Everybody Gets Emergency Messages
* .emerg *
# Save News Errors of Level Crit And Higher In a Special File.
UUCP, news.crit / var / log / spooler
# Save boot message also to boot.log
Local7. * /VAR/LOG/Boot.log
# Test1
Local3. * /test1/log/test1msg.log
Local4. * /test1/log/test1rr.log
# Test2
Local5. * /test2/log/test2 msg.log
Local6. * /test2/log/test2err.log
2. Then restart Syslogd makes it take effect. Killall-Hup syslogd. Yes.