Projet

Général

Profil

Development #6922

Change default logging configuration

Ajouté par Benjamin Dauvergne il y a environ 9 ans. Mis à jour il y a environ 9 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
Début:
09 avril 2015
Echéance:
% réalisé:

100%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

We only configure the root logger and 'django.db'. If DEBUG is True we see the root logger to DEBUG. We do not use Django default logging configuration by bypassing it using LOGGING_CONFIG = None[1]. Add a new filter to provide, usename, ip and a request ID to the formatter. Add a new setting DEBUG_DB for activating logging of SQL queries.

1 https://www.caktusgroup.com/blog/2015/01/27/Django-Logging-Configuration-logging_config-default-settings-logger/


Fichiers

Révisions associées

Révision e35acb09 (diff)
Ajouté par Benjamin Dauvergne il y a environ 9 ans

Add a XForwardedForMiddleware middleware (#6922)

It allows authentic to automatically get the real ip when behind
Gunicorn+nginx.

Révision d4aa335a (diff)
Ajouté par Benjamin Dauvergne il y a environ 9 ans

Set a request id on all requests (#6922)

The request id is extracted from an header set using the
REQUEST_ID_HEADER setting or generated using the default Python random
number generator.

Révision cae8db3f (diff)
Ajouté par Benjamin Dauvergne il y a environ 9 ans

Change default logging configuration (fixes #6922)

We only configure the root logger and 'django.db'. If DEBUG is True we
see the root logger to DEBUG. We do not use Django default logging
configuration by bypassing it using LOGGING_CONFIG = None1.

  • django_select2 logger is set to warning as the INFO level emit
    uninteresting messages
  • django.db logger is set to INFO, to prevent getting SQL queries when
    DEBUG is True. To get the SQL queries set DEBUG_DB to True in your
    settings.
  • Set a default logging configuration for the multitenant packaging
  • Add a RequestContextFilter logging filterto provide, usename, ip
    and a request ID to the formatter.
  • Use the new filter in default, debian and debian-multitenant settings.
  • Add a new setting DEBUG_DB for activating logging of SQL queries.

[1]: https://www.caktusgroup.com/blog/2015/01/27/Django-Logging-Configuration-logging_config-default-settings-logger/

Révision 4f3359f0 (diff)
Ajouté par Benjamin Dauvergne il y a environ 9 ans

Add a XForwardedForMiddleware middleware (#6922)

It allows authentic to automatically get the real ip when behind
Gunicorn+nginx.

Révision 59f536e9 (diff)
Ajouté par Benjamin Dauvergne il y a environ 9 ans

Set a request id on all requests (#6922)

The request id is extracted from an header set using the
REQUEST_ID_HEADER setting or generated using the default Python random
number generator.

Révision c8e10def (diff)
Ajouté par Benjamin Dauvergne il y a environ 9 ans

Change default logging configuration (fixes #6922)

We only configure the root logger and 'django.db'. If DEBUG is True we
see the root logger to DEBUG. We do not use Django default logging
configuration by bypassing it using LOGGING_CONFIG = None1.

  • django_select2 logger is set to warning as the INFO level emit
    uninteresting messages
  • django.db logger is set to INFO, to prevent getting SQL queries when
    DEBUG is True. To get the SQL queries set DEBUG_DB to True in your
    settings.
  • Set a default logging configuration for the multitenant packaging
  • Add a RequestContextFilter logging filterto provide, usename, ip
    and a request ID to the formatter.
  • Use the new filter in default, debian and debian-multitenant settings.
  • Add a new setting DEBUG_DB for activating logging of SQL queries.

[1]: https://www.caktusgroup.com/blog/2015/01/27/Django-Logging-Configuration-logging_config-default-settings-logger/

Historique

#1

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Description mis à jour (diff)
#2

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Description mis à jour (diff)
#3

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

This patch set will also add a new middleware only used by the debian package, to get the real ip from the X-Forwarded-For header as gunicorn has deprecated this behaviour in gunicorn 18.

#4

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

#5

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Fichier 0003-Change-default-logging-configuration-fixes-6922.patch supprimé
#7

Mis à jour par Thomas Noël il y a environ 9 ans

Ack.

#8

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Statut changé de Nouveau à Résolu (à déployer)
  • % réalisé changé de 0 à 100
#9

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Assigné à mis à Benjamin Dauvergne
  • Version cible mis à 2.2.0
#10

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

#11

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Version cible changé de 2.2.0 à 2.1.14
#12

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Statut changé de Résolu (à déployer) à Fermé

Formats disponibles : Atom PDF