deavmi / dlog

Simple and modular logging library
https://deavmi.assigned.network/projects/dlog
GNU Lesser General Public License v3.0
1 stars 0 forks source link

[SERIOUS] Integrate with syslog #2

Open tristan957 opened 2 years ago

tristan957 commented 2 years ago

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

deavmi commented 2 years ago

I'll definitely look into adding this sometime this coming month!

deavmi commented 2 months ago

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 :)

deavmi commented 2 months ago

@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.

tristan957 commented 2 months ago

@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 commented 2 months ago

@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

tristan957 commented 2 months ago

Look at the source and filtering portions of journalctl(1). You'll probably want to use a combo of since, identifier, and grep