Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SERIOUS] Integrate with syslog #2

Open
tristan957 opened this issue Mar 25, 2022 · 6 comments · May be fixed by #6
Open

[SERIOUS] Integrate with syslog #2

tristan957 opened this issue Mar 25, 2022 · 6 comments · May be fixed by #6
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tristan957
Copy link

tristan957 commented Mar 25, 2022

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
Copy link
Owner

deavmi commented Mar 31, 2022

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

@deavmi deavmi self-assigned this Mar 31, 2022
@deavmi deavmi added enhancement New feature or request help wanted Extra attention is needed labels Mar 31, 2022
@deavmi
Copy link
Owner

deavmi commented Apr 26, 2024

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 deavmi linked a pull request Apr 26, 2024 that will close this issue
@deavmi
Copy link
Owner

deavmi commented Apr 27, 2024

@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
Copy link
Author

@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
Copy link
Owner

deavmi commented May 2, 2024

@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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants