fluent / fluent/fluent-logger-python

support of `asctime`

Ouverte
#210 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
457
Forks
138
Métriques de merge des PR
Aucune PR mergée en 30 j

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`

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
tooling
Type d'issue
Fonctionnalité
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.