Hi, I have tried a long time to get it working with rsyslog etc.
But finally I have moved on to journald. Now I have readable, per pdns instance logfiles. so start pdns with --disable-syslog add log-timestamp=no to pdns.conf gives you readable logs per pdns instance you can easily read using journalctl -fu pdns@instance. You can then ship the journald to your central syslog server. Best Thomas On 7/29/20 9:46 AM, Markus Ehrlicher via Pdns-users wrote:
Hello Pierrick, what kind of OS do you use? „if $programname == 'pdns_recursor' then stop“ in your syslog-configuration should do the trick. best regards, Markus *Von:*Pdns-users <pdns-users-boun...@mailman.powerdns.com> *Im Auftrag von *Pierrick CHOVELON via Pdns-users *Gesendet:* Mittwoch, 29. Juli 2020 09:11 *An:* pdns-users@mailman.powerdns.com *Betreff:* [Pdns-users] Log written in multiple files Hi everyone, I'm struggling with the logging configuration. I enabled the syslog logging on a pdns-recursor. So I got three files : local5.=info -/var/log/pdns/pdns.info <http://pdns.info> local5.=warn -/var/log/pdns/pdns.warn local5.err /var/log/pdns/pdns.err As my server is being more and more used, it generates more logs and I can see that logs are also written in /etc/var/log/syslog and messages which will used a lot of space ... I tried with many configuration, but can't achieve what I want : * logs only in those three files not elsewhere Here is the execstart of the service ExecStart=/usr/sbin/pdns_recursor --daemon=no --write-pid=no --log-timestamp=no I put this line in the service definition to disable the logging in /var/log/syslog StandardOutput=null But logs are still written in /var/log/messages Have you got any idea ? Regards ! _______________________________________________ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users
_______________________________________________ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users