-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Adding logging to the nix-daemon #1829
Comments
Could be related to, though much broader in scope, #1710 |
I have created a basic version of such logging for all the operation performed by the Any opinions and/or suggestions? All are welcome! :) |
@lovasko Is there a reason to use syslog above just stderr? |
@shlevy my thinking was, that since this is a daemon, a fully daemonised process does not have open Sadly, LOG_PERROR isn't fully standard, but is very commonplace. |
Systemd forwards stderr to the journal. Nix even emits severity levels for use by journald (see |
BTW I'm skeptical that logging every request is useful. A typical evaluation can issue thousands of requests, so this will cause some serious log spamming. |
It will be informative if each message contains a uuid and the uuid of its parent task. That way the full task tree can be constructed from the logs. This idea is in OpenCensus, OpenTracing, and Eliot among others. |
I marked this as stale due to inactivity. → More info |
It would be useful if the nix-daemon logged requests it receives and operations it performs. Among other things, this would be useful for:
It would be straightforward to implement this at a basic level, but there are some questions to consider.
The easiest format would be having nix-daemon itself log each request and each response as a single line, and have each line contain information about the connection and user. Something like this, perhaps:
The text was updated successfully, but these errors were encountered: