fluent / fluent/fluent-logger-python

support of `asctime`

Offen
#210 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
457
Forks
138
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

It would be great to support both milliseconds and timezone in the datefmt, for example: `%Y-%m-%dT%H:%M:%S,%f%z`. (I used `%f `for milliseconds, even though it's not supported by` datetime.strftime`.)

I understand this limitation comes from the standard library formatter `logging.Formatter`, but if `fluent-logger-python` could work around or resolve it, that would be very helpful.

As a work around, user may provide a `format_time(record, datefmt)` function to the constructor instead of relying on the `logging.Formatter.formatTime`

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.