-
Notifications
You must be signed in to change notification settings - Fork 262
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 timestamp to stderr logging #759
Comments
Pipe the proces output into |
Hi Sean ( @sgaragan ), in addition to the suggestion from the great @job i have passed a patch to uniform the output of stderr and logfile, hence including a timestamp in the stderr output. Tested it, it seems to work fine, please give it a try yourself (see commit above). I have also added a piece of documentation for people upgrading since this will break any script parsing stderr output. Paolo |
@paololucente is that enabled by default? I'm not sure timestamping should be enabled by default, as it breaks with conventions |
I made it new default but, sure, i could totally make it optional and save backward compatibility. Let me go in this direction. |
Thanks Paolo, I will look at getting it redeployed when the change goes in with the optional config (which I agree makes sense, if making it a default will break backward compatibility) |
Description
When deploying pmacct on Kubernetes, logging is configured to be sent to stderr which is the standard logging model for a K8s deployment. However, the log messages do not seem to have any timestamps so there is no way to know when an issue occurred. For the log messages sent to syslog or a specific log file, timestamps are included with those messages (in syslog via the vsyslog function, log file has timestamps explicitly added to the output message)
Version
1.7.10
The text was updated successfully, but these errors were encountered: