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

wish: timestamps for log outputs #82

Closed
andreas-wittig opened this issue Mar 7, 2023 · 5 comments
Closed

wish: timestamps for log outputs #82

andreas-wittig opened this issue Mar 7, 2023 · 5 comments

Comments

@andreas-wittig
Copy link
Contributor

andreas-wittig commented Mar 7, 2023

  • 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
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:02, INFO:yacron:Cron job job_myjob: reporting success
2023-03-07 01:05:04, INFO:yacron:Shutting down (after currently running jobs finish)...
@gjcarneiro
Copy link
Owner

gjcarneiro commented Mar 8, 2023 via email

@andreas-wittig
Copy link
Contributor Author

Hi gjcarneiro, yes I understand your feedback.

  • But with this argument all logs in general has to be without timestamps :-| That makes obiously no sense.
  • Anyway applications still with Kubernetes have console output where timestamps makes sense - especially for a scheduler! :-)

@gjcarneiro
Copy link
Owner

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: kubectl logs podname --timetamps.

@andreas-wittig
Copy link
Contributor Author

andreas-wittig commented Mar 8, 2023

we live in customers cluster. we cannot add resources at wish.
Our delivery to the customer is an Docker-Image; our debug ressource are based on the toolset inside our running container.
It's just an idea that would help. From my point of view timestamps originated by a SCHEDULER are no noise.

@gjcarneiro
Copy link
Owner

Fixed in 0.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants