-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Support ISO 8601 timestamps in logging #2802
Comments
@dalbani , I'm not really familiar with date formatting in loggers, but from what I see and tested locally, it would need a change in Scrapy's formatter setup to use |
@redapple: yes, that would be nice to have that kind of functionality. |
@redapple: yes, that would be very useful to me 👍 |
I haven't been able to configure logging via
LOG_DATEFORMAT
to output ISO 8601 timestamps.Given that the logging formatter is passed local
time
s apparently (??), I suppose that I need to use the%z
qualifier.But
%z
always returns+0000
in my configuration (Ubuntu 16.04, Linux 2.7) — whereas in my case%Z
correctly producesCEST
.My understanding is that Python's
logging.Formatter()
doesn't support timezone offset: https://stackoverflow.com/questions/27858539/python-logging-module-emits-wrong-timezone-information##answer-27865750Am I missing something obvious to be able to produce ISO 8601 timestamps in my Scrapy logs?
The text was updated successfully, but these errors were encountered: