fluent / fluent/fluent-logger-python
support of `asctime`
- Dominant language
- Python
- Stars
- 457
- Forks
- 138
- PR merge metrics
- No merged PRs in 30d
Description
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`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading Python's logging.Formatter.formatTime behavior and the logger constructor's format_time(record, datefmt) workaround described in the issue. Check how datefmt is currently passed through, then verify that a format such as %Y-%m-%dT%H:%M:%S,%f%z produces milliseconds and timezone information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100