-
Notifications
You must be signed in to change notification settings - Fork 40
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
wish: timestamps for log outputs #82
Comments
Fine, we can add the option.
But yacron was primarily designed to run inside docker/kubernetes.
Inside docker, usually there is a logging framework already that captures
the stdout and stderr of the container and ships the logs somewhere, while
automatically adding timestamps.
In this scenario, it is confusing and ugly to have timestamps, as they will
appear in duplicate in the end.
…On Tue, 7 Mar 2023 at 20:03, andreas-wittig ***@***.***> wrote:
- Yet Another Cron version: yacron-0.18.0-x86_64-unknown-linux-gnu
- Python version: --
- Operating System: Kubernetes/Linux
Description
This wish is similiar to #33
<#33>
A typical yacron log looks (resp console output) like:
INFO:yacron:Job job_myjob exit code 0; has stdout: false, has stderr: true; fail_reason: None
INFO:yacron:Cron job job_myjob: reporting success
INFO:yacron:Shutting down (after currently running jobs finish)...
This is rather odd for a scheduler: the datetime the events did occur are
missing hardly for production environments (where logs are captured in a
logfile). The wish is to have a timestamp in the log (which is commaon
practice for logfiles), eg:
2023-03-07 01:05:00, INFO:yacron:Job job_myjob exit code 0; has stdout: false, has stderr: true; fail_reason: None
2023-03-07 01:05:00, INFO:yacron:Cron job job_myjob: reporting success
2023-03-07 01:05:00, INFO:yacron:Shutting down (after currently running jobs finish)...
—
Reply to this email directly, view it on GitHub
<#82>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQYM2GFIME2EOUQ7RNNUW3W26H7JANCNFSM6AAAAAAVS5KBZU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Gustavo J. A. M. Carneiro
Gambit Research
"The universe is always one step beyond logic." -- Frank Herbert
|
Hi gjcarneiro, yes I understand your feedback.
|
If you ship logs with fluentd or whatever, and visualize them in kibana or whatever, then the timestamp is its own field, and is formatted/displayed by the logs UI. Having another timestamp embedded in the message is ugly noise. In Kubernetes, console output, you can trivially ask for timestamps to be added: |
we live in customers cluster. we cannot add resources at wish. |
Fixed in 0.19 |
Description
This wish is similiar to #33
A typical yacron log looks (resp console output) like:
This is rather odd for a scheduler: the datetime the events did occur are missing hardly for production environments (where logs are captured in a logfile). The wish is to have a timestamp in the log (which is commaon practice for logfiles), eg:
The text was updated successfully, but these errors were encountered: