-
Notifications
You must be signed in to change notification settings - Fork 70
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
capnslog: why check ppid = 1 for systemd? #38
Comments
This aimed for the 80% case. Open for fix up suggestions. I take it you'd Is there a better detection algorithm? If so, let's do it (detect parent
|
What about util.RunningFromSystemService() from coreos/go-systemd? |
@jonboulle How do you think we should deal with this? Sending to journal by detecting pid+systemd is proven to confuse people, in rkt case at least: |
@xiang90 for this specific issue I'm sympathetic towards #38 (comment) I'm actually not convinced that capnslog should log directly to the journal - rather it seems to me it'd be sufficient if it didn't log timestamps when it detects it's invoked from systemd. |
If the timestamp is the only issue, yea, probably we should just try #38 (comment) to detect systemd, and do not log timestamp. |
Current algorithm for journal detection:
This is wrong for two reasons: 1. systemd isn't always pid 1 (user session) 2. it is code stutter having a heuristic and then a authoritative check after 3. even if systemd is pid, your parent might not be pid 1.
@barakmich Was there a reason for doing this check that I might be missing? Otherwise we should fix it up.
Thanks.
The text was updated successfully, but these errors were encountered: