Open tristan957 opened 2 years ago
I'll definitely look into adding this sometime this coming month!
syslog is pretty standard at least on Linux. Would be nice to see support for that.
I see that DefaultLogger writes to stdout. Looks like you just need a SyslogLogger that writes to syslog. This looks promising: https://github.com/dlang/druntime/blob/master/src/core/sys/posix/syslog.d
Actually gonna implement this now because of the re-write I did :)
@tristan957 Do I need to install syslogd
to actually see the logs go out, as man -S 3 syslog
shows nothing about return value or status of "a successful log" so I am wondering how best to test it.
Please advise.
@deavmi on my system with systemd, I can use journalctl to see it. It would depend on the backing syslog implementation that you use.
@deavmi on my system with systemd, I can use journalctl to see it. It would depend on the backing syslog implementation that you use.
A call to syslog
seemingly "works" but not sure where to sfind the logs. WHat command, as I too am on systed, do you run in order to find it? @tristan957
Look at the source and filtering portions of journalctl(1)
. You'll probably want to use a combo of since
, identifier
, and grep
syslog is pretty standard at least on Linux. Would be nice to see support for that.
I see that DefaultLogger writes to stdout. Looks like you just need a SyslogLogger that writes to syslog. This looks promising: https://github.com/dlang/druntime/blob/master/src/core/sys/posix/syslog.d
UPDATE LINK: https://github.com/dlang/dmd/blob/master/druntime/src/core/sys/posix/syslog.d