-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: formatage des logs en json avant envoi à datadog #927
base: master
Are you sure you want to change the base?
Conversation
… management command
9e5298f
to
53bed82
Compare
pour discussion avant finalisation @francoisfreitag @xavfernandez @leo-naeka @tonial, notamment :
|
"kwargs": context.request.resolver_match.kwargs, | ||
"method": context.request.method, | ||
"user_id": context.request.user.id if context.request.user.is_authenticated else None, | ||
"session_key": context.request.session.session_key, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -24,7 +24,7 @@ | |||
from lacommunaute.utils.urls import clean_next_url | |||
|
|||
|
|||
logger = logging.getLogger(__name__) | |||
logger = getLogger("lacommunaute") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personnellement j'aime bien avoir des loggers différents pour retrouver plus facilement d'où vient un log.
Description
🎸 Capture et formattage des logs au format json
🔨 renommange des loggers
🔨 harmonisation des imports
🔨 enrichissement des traces des logs de vues (à améliorer)
🔨 enrichissement des traces des
management command
(à faire)Type de changement
🚧 technique
Points d'attention
🦺 comment automatiser la collecte des données de
request
par le logger sans passer les données enextra