Hello Jürgen, hello all. Wonderful new BSD-style syslogd with builtin log rotation support! It makes available remote logging by default though, which is why on FreeBSD the options -s (or even -ss) are recommendet. Please find below. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
Steffen Nurpmeso wrote in <20200117215549.vY3WG%steffen@sdaoden.eu>: |Hello Jürgen, hello all. | |Wonderful new BSD-style syslogd with builtin log rotation support! |It makes available remote logging by default though, which is why |on FreeBSD the options -s (or even -ss) are recommendet. And how about dropping rotatelog, /var/log/old and simply using below /etc/syslog.conf? A nice weekend everybody. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
On 2020-01-17 23:05, Steffen Nurpmeso wrote:
Steffen Nurpmeso wrote in <20200117215549.vY3WG%steffen@sdaoden.eu>: |Hello Jürgen, hello all. | |Wonderful new BSD-style syslogd with builtin log rotation support! |It makes available remote logging by default though, which is why |on FreeBSD the options -s (or even -ss) are recommendet.
And how about dropping rotatelog, /var/log/old and simply using below /etc/syslog.conf?
A nice weekend everybody.
Looks good. Dont think its a good idea to abandon rotatelog mid-release since people might use it for more custom stuff. Even abandoning it completely for next release would be unfortunate imho. Not everything logs through syslog /f
Fredrik wrote in <7978be63-dacf-9015-dac0-93efcf695261@rinnestam.se>: |On 2020-01-17 23:05, Steffen Nurpmeso wrote: |> Steffen Nurpmeso wrote in <20200117215549.vY3WG%steffen@sdaoden.eu>: |>|Hello Jürgen, hello all. |>| |>|Wonderful new BSD-style syslogd with builtin log rotation support! |>|It makes available remote logging by default though, which is why |>|on FreeBSD the options -s (or even -ss) are recommendet. |> |> And how about dropping rotatelog, /var/log/old and simply using |> below /etc/syslog.conf? |> |> A nice weekend everybody. | |Looks good. Dont think its a good idea to abandon rotatelog mid-release |since people might use it for more custom stuff. Even abandoning it |completely for next release would be unfortunate imho. Not everything |logs through syslog Sure. For me the problem with it was that there is no size restriction, it only rotates via cron. Now on my server i do have a partition only for the log files, but even there i do not want to get disk full errors because other logs would be incomplete. (Despite not knowing how syslog behaves if it cannot put new entries, i never tried.) I feel much saver when i can specify it, so i can calculate the maximum space necessary for all logs, and still have some pad. Hm. rotatelog and its syslog cron file are part of the sysklogd package. :) And really hard to adjust. I for one am really happy with the new syslog! Despite what is still missing for me is a hook that gets called when files actually get rotated. On the VM, which still does not drive CRUX but Alpine, busybox syslog can also not call hooks, but knows about rotation and size limit. busybox has inotifyd, so i can set watches on /var/log, even though i hate it So i wrote the patch as attached. It seems to fix a syslog.conf option parsing bug, too. I'll mail him that in a second. I now have *.emerg * kern.* /var/log/kernel ;rotate=1M:3,rotatehook=/root/syslog.sh authpriv,auth.info /var/log/auth ;rotate=200k:3,rotatehook=/root/syslog.sh mail.info /var/log/mail ;rotate=1M:10,rotatehook=/root/syslog.sh cron.info /var/log/cron ;rotate=200k:3,rotatehook=/root/syslog.sh *.info;authpriv,auth,mail,cron,kern.none /var/log/messages ;rotate=1M:5,rotatehook=/root/syslog.sh *.=debug;kern.none /var/log/debug ;rotate=200k:3,rotatehook=/root/syslog.sh include /etc/syslog.d/*.conf And seems to work great! :) --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
Steffen Nurpmeso wrote in <20200118202648.J5Qup%steffen@sdaoden.eu>: |Fredrik wrote in <7978be63-dacf-9015-dac0-93efcf695261@rinnestam.se>: ||On 2020-01-17 23:05, Steffen Nurpmeso wrote: ||> Steffen Nurpmeso wrote in <20200117215549.vY3WG%steffen@sdaoden.eu>: ... ||>|Wonderful new BSD-style syslogd with builtin log rotation support! ||>|It makes available remote logging by default though, which is why ||>|on FreeBSD the options -s (or even -ss) are recommendet. ... |Despite what is still missing for me is a hook that gets called |when files actually get rotated. On the VM, which still does not ... |So i wrote the patch as attached. It seems to fix a syslog.conf |option parsing bug, too. I'll mail him that in a second. I now So, and that bugfix was incomplete/wrong. Please find attached a diff which fixes that correctly. Otherwise unchanged. |And seems to work great! :) That i how i like logging for sure. Auto-rotation, compression of elder rotated logs, and a hook which informs rotation happened. Happy. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
On 2020-01-19 01:15, Steffen Nurpmeso wrote:
Steffen Nurpmeso wrote in <20200118202648.J5Qup%steffen@sdaoden.eu>: |Fredrik wrote in <7978be63-dacf-9015-dac0-93efcf695261@rinnestam.se>: ||On 2020-01-17 23:05, Steffen Nurpmeso wrote: ||> Steffen Nurpmeso wrote in <20200117215549.vY3WG%steffen@sdaoden.eu>: ... ||>|Wonderful new BSD-style syslogd with builtin log rotation support! ||>|It makes available remote logging by default though, which is why ||>|on FreeBSD the options -s (or even -ss) are recommendet. ... |Despite what is still missing for me is a hook that gets called |when files actually get rotated. On the VM, which still does not ... |So i wrote the patch as attached. It seems to fix a syslog.conf |option parsing bug, too. I'll mail him that in a second. I now
So, and that bugfix was incomplete/wrong. Please find attached a diff which fixes that correctly. Otherwise unchanged.
|And seems to work great! :)
That i how i like logging for sure. Auto-rotation, compression of elder rotated logs, and a hook which informs rotation happened. Happy.
--steffen
Agreed - I like it too! For now i've implemented your suggestion to not listen for network connections by default. Have you tried getting the rotation stuff implemented upstream? /f
Hello Fredrik. Fredrik wrote in <400f207b-a29d-59a7-e09d-f9778d550e1f@rinnestam.se>: |On 2020-01-19 01:15, Steffen Nurpmeso wrote: |> Steffen Nurpmeso wrote in <20200118202648.J5Qup%steffen@sdaoden.eu>: |>|Fredrik wrote in <7978be63-dacf-9015-dac0-93efcf695261@rinnestam.se>: |>||On 2020-01-17 23:05, Steffen Nurpmeso wrote: |>||> Steffen Nurpmeso wrote in <20200117215549.vY3WG%steffen@sdaoden.eu>: |> ... |>||>|Wonderful new BSD-style syslogd with builtin log rotation support! |>||>|It makes available remote logging by default though, which is why |>||>|on FreeBSD the options -s (or even -ss) are recommendet. |> ... |>|Despite what is still missing for me is a hook that gets called |>|when files actually get rotated. On the VM, which still does not |> ... |>|So i wrote the patch as attached. It seems to fix a syslog.conf |>|option parsing bug, too. I'll mail him that in a second. I now |> |> So, and that bugfix was incomplete/wrong. |> Please find attached a diff which fixes that correctly. |> Otherwise unchanged. |> |>|And seems to work great! :) |> |> That i how i like logging for sure. Auto-rotation, compression of |> elder rotated logs, and a hook which informs rotation happened. |> Happy. |> |> --steffen | |Agreed - I like it too! For now i've implemented your suggestion to not |listen for network connections by default. That is a good default i would say. |Have you tried getting the rotation stuff implemented upstream? Ach, sorry, my "bugfix" made things worse. But yes, i did, he is interested, but would like to have it differently. He would prefer a generic "notify HOOK" at top level, rather than a per-rule hook. I will (try to) do it today, after i have falsely claimed the option parsing was wrong, .. blush. In fact i suggested such a thing for busybox syslogd in 2016, hm. Let's see whether i can do that for sysklogd. I also just responded to his answer with another thought, since on IRC ][_R_][ said he needs YEAR/MONTH/DAY, i asked for the possibility to rotate all (configured) logs on signal, so with that and the "notify" hook even such a scenario should be handable easily. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
Steffen Nurpmeso wrote in <20200120161302.SsbIC%steffen@sdaoden.eu>: |Fredrik wrote in <400f207b-a29d-59a7-e09d-f9778d550e1f@rinnestam.se>: ||On 2020-01-19 01:15, Steffen Nurpmeso wrote: ||> Steffen Nurpmeso wrote in <20200118202648.J5Qup%steffen@sdaoden.eu>: ||>|Fredrik wrote in <7978be63-dacf-9015-dac0-93efcf695261@rinnestam.se>: ||>||On 2020-01-17 23:05, Steffen Nurpmeso wrote: ||>||> Steffen Nurpmeso wrote in <20200117215549.vY3WG%steffen@sdaoden.eu>: ||> ... ||>||>|Wonderful new BSD-style syslogd with builtin log rotation support! ||>||>|It makes available remote logging by default though, which is why ||>||>|on FreeBSD the options -s (or even -ss) are recommendet. ||> ... ||>|Despite what is still missing for me is a hook that gets called ||>|when files actually get rotated. On the VM, which still does not ... ||> That i how i like logging for sure. Auto-rotation, compression of ||> elder rotated logs, and a hook which informs rotation happened. ... ||Agreed - I like it too! For now i've implemented your suggestion to not ||listen for network connections by default. | |That is a good default i would say. | ||Have you tried getting the rotation stuff implemented upstream? So i just have finished that sysklogd intermezzo, let's see whether Joachim merges it in. If he does we will get a notify keyword, which can be used multiple times, and sysklogd will forcefully rotate all files for which rotation is configured when receiving a SIGUSR2. Works fine here, my /etc/syslog.conf became # # /etc/syslog.conf # *.emerg * kern.* /var/log/kernel ;rotate=1M:5 authpriv,auth.info /var/log/auth ;rotate=200k:3 mail.info /var/log/mail ;rotate=1M:5 cron.info /var/log/cron ;rotate=200k:3 *.info;authpriv,auth,mail,cron,kern.none /var/log/messages ;rotate=1M:5 *.=debug;kern.none /var/log/debug ;rotate=200k:3 include /etc/syslog.d/*.conf notify /root/syslog.sh # End of file I will attach the diff, maybe someone wants to try it out. Ciao, --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
participants (2)
-
Fredrik
-
Steffen Nurpmeso