3
0

syslog.conf.txt 1.4 KB

12345678910111213141516171819202122232425262728
  1. If syslogd applet compiled with FEATURE_SYSLOGD_CFG=y, then it supports restricted syslog.conf.
  2. The config resembles rsyslog.conf in RULES part:
  3. LINE = DELIM [RULE | COMMENT]
  4. COMMENT = #.*
  5. DELIM = SPACE TAB
  6. RULE = SELECTOR [;SELECTOR]* DELIM* ACTION DELIM*
  7. SELECTOR = FACILITY [,FACILITY]* .[[!]=] PRIORITY
  8. FACILITY = * | kern | user ... (see syslog.h)
  9. PRIORITY = * | emerg | alert ... (see syslog.h)
  10. ACTION = FILE
  11. "mark" facility is NOT supported.
  12. "none" priority is supported.
  13. In FACILITY and PRIORITY "*" stands for "any".
  14. FILE is a regular file or tty device.
  15. Here is an example:
  16. #syslog.conf
  17. kern,user.* /var/log/messages #all messages of kern and user facilities
  18. kern.!err /var/log/critical #all messages of kern facility with priorities lower than err (warn, notice ...)
  19. *.*;auth,authpriv.none /var/log/noauth #all messages except ones with auth and authpriv facilities
  20. kern,user.*;kern.!=notice;*.err;syslog.none /var/log/OMG #some whicked rule just as an example =)
  21. *.* /dev/null #this prevents from logging to default log file (-O FILE or /var/log/messages)
  22. Even in the case of match with some rule another rules will be tried too.
  23. If there was no match with any of the rules, logging to default log file or shared memory will be performed.