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

Don't log time, logger can be formatted to include time #1149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jshah
Copy link

@jshah jshah commented Aug 28, 2021

Summary

Including time in logger pollutes loggers that already have a timestamp included. Developers can set their own logger through Delayed::Worker.logger. Additionally, common logging platforms are able to determine time on ingestion such as Cloudwatch, Datadog, Scalyr, etc.

Background

This pr initially included time 10 years ago when Rails didn't support time in logs: #37. 5 years later, this issue was opened asking for the same fix #859 but Rails still did not support it. Now, this is possible with Rails loggers using your own logger and setting Rails.logger.datetime_format to your own desired format, see https://stackify.com/rails-logger-and-rails-logging-best-practices/ for examples/tutorial.

@jshah
Copy link
Author

jshah commented Sep 1, 2021

@albus522 have time to review?

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

Successfully merging this pull request may close these issues.

1 participant