fluent / fluent/fluent-logger-python

support of `asctime`

Đang mở
#210 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
457
Fork
138
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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`

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
tooling
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.