Mercurial > lbo > hg > syslog
view prototype.toml @ 27:ceb9bd6d94e2 draft
Change pattern evaluation model to what rsyslogd does
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Sun, 04 Dec 2016 17:47:55 +0100 |
parents | eae478565a9f |
children |
line wrap: on
line source
# Example configuration file. [general] # All possible options are set here max_msg_len = 2048 bind_path = "/dev/log" [remotes] [remotes.main] # All possible options are set here addr = "10.0.0.2" port = 538 [remotes.example] addr = "example.com" port = 11023 [files] [files.messages] # All possible options are described here file = "/var/log/messages" # e.g. "1k" "2M" "3G" default: 4M max_size = "2048k" # how many old files to keep; default = 10 history = 7 [files.maillog] file = "/var/log/mail.log" # e.g. "1h" "2d" "3w" max_age = "7d" [files.infolog] file = "/var/log/info.log" # how to compress old files. Possible values: "none" "gzip" compress = "gzip" # ##################### # Rules are evaluated in the defined order. # This means that the same message can end up in several destinations. # # A pattern consists of one or more filters, separated by ';'. # A filter consists of one or more facilities, a dot ('.'), and one or more levels. # A facility is kern/user/mail/daemon/auth/syslog/lpr/news/uucp/cron/authpriv/ftp or local0..local7; # multiple facilities are separated by ','. # # A level is none/emerg/alert/crit/err/warn/notice/info/debug; multiple levels are separated by ','. # A single level matches all levels that are more important than itself and itself (crit matches crit, alert and emerg). # A single level prefixed by '=' matches only that level ('=crit' matches only crit). # # The evaluation order inside a pattern is left-to-right; all filters must match a message. # # If a rule has the stop property set to 'true', then evaluation stops if the pattern matched. [[rules]] pattern = "lpr.*" # null refers to the special null destination, which sends messages to /dev/null. dest = "null" [[rules]] pattern = "mail,news.*" # One destination can be referenced in multiple rules. dest = "maillog" # stop evaluation after this rule. Default is fall-through. # i.e., make sure log messages from the mail and news systems ONLY end up in maillog, and nowhere else. stop = true [[rules]] # Log all info messages except for messages coming from mail to infolog. pattern = "*.info;mail.none" dest = "infolog" [[rules]] pattern = "*.*" dest = "messages" [[rules]] pattern = "auth.*" remote_dest = "main"