#31537: Optionally log server_time with timzone
-----------------------------------------+------------------------
               Reporter:  thenewguy      |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  Uncategorized  |        Version:  3.0
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 It would be helpful if logging format included the timezone for the logged
 time.  When this information is parsed (for example logging aggregation
 using logstash and the elastic stack) the timezone data would be very
 helpful so the time is correct.

 For reference, https://docs.python.org/3/library/logging.html
 {{{
 Changed in version 3.3: Previously, the default format was hard-coded as
 in this example: 2010-09-06 22:38:15,292 where the part before the comma
 is handled by a strptime format string ('%Y-%m-%d %H:%M:%S'), and the part
 after the comma is a millisecond value. Because strptime does not have a
 format placeholder for milliseconds, the millisecond value is appended
 using another format string, '%s,%03d' — and both of these format strings
 have been hardcoded into this method. With the change, these strings are
 defined as class-level attributes which can be overridden at the instance
 level when desired. The names of the attributes are default_time_format
 (for the strptime format string) and default_msec_format (for appending
 the millisecond value).
 }}}

 Since the date time output is not created via one format operation it is
 more complicated than just adding %Z or %z to the format string

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31537>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.6850c7890df287e5666e36c072175f93%40djangoproject.com.

Reply via email to