Mercurial > lbo > hg > syslog
changeset 6:fee9e63c0cc4 draft
Write prototype config file
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Sat, 26 Nov 2016 12:34:34 +0100 |
parents | ec89c5375b21 |
children | 6131d87d105b |
files | Cargo.toml prototype.toml |
diffstat | 2 files changed, 52 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Cargo.toml Sat Nov 26 11:56:58 2016 +0100 +++ b/Cargo.toml Sat Nov 26 12:34:34 2016 +0100 @@ -7,3 +7,4 @@ futures = "0.1" tokio-core = "0.1" tokio-uds = "0.1" +toml = "0.2"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prototype.toml Sat Nov 26 12:34:34 2016 +0100 @@ -0,0 +1,51 @@ +# 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 + +[[files]] +# 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]] +file = /var/log/mail.log +# e.g. "1h" "2d" "3w" +max_age = "7d" + +[[files]] +file = /var/log/info.log +# how to compress old files. Possible values: "none" "gzip" +compress = "gzip" + +# ##################### +# Rules are evaluated in the defined order, but a match doesn't stop evaluation. +# This means that the same message can end up in several destinations. +[[rules]] +pattern = "*.info,mail.none,auth.none" +dest = /var/log/info.log + +[[rules]] +pattern = "mail.*" +dest = /var/log/mail.log + +[[rules]] +pattern = "*.*" +dest = /var/log/messages + +[[rules]] +pattern = "auth.*" +dest = remotes.main