File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -806,7 +806,17 @@ def DOCKER_LIMITS(self):
806
806
"()" : structlog .stdlib .ProcessorFormatter ,
807
807
"processors" : [
808
808
structlog .stdlib .ProcessorFormatter .remove_processors_meta ,
809
- structlog .dev .ConsoleRenderer (),
809
+ structlog .dev .ConsoleRenderer (colors = False ),
810
+ ],
811
+ # Allows to add extra data to log entries generated via ``logging`` module
812
+ # See https://www.structlog.org/en/stable/standard-library.html#rendering-using-structlog-based-formatters-within-logging
813
+ "foreign_pre_chain" : shared_processors ,
814
+ },
815
+ "colored_console" : {
816
+ "()" : structlog .stdlib .ProcessorFormatter ,
817
+ "processors" : [
818
+ structlog .stdlib .ProcessorFormatter .remove_processors_meta ,
819
+ structlog .dev .ConsoleRenderer (colors = True ),
810
820
],
811
821
# Allows to add extra data to log entries generated via ``logging`` module
812
822
# See https://www.structlog.org/en/stable/standard-library.html#rendering-using-structlog-based-formatters-within-logging
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ def RTD_EMBED_API_EXTERNAL_DOMAINS(self):
77
77
@property
78
78
def LOGGING (self ):
79
79
logging = super ().LOGGING
80
+ logging ['handlers' ]['console' ]['formatter' ] = 'colored_console'
80
81
logging ['loggers' ].update ({
81
82
# Disable Django access requests logging (e.g. GET /path/to/url)
82
83
# https://github.com/django/django/blob/ca9872905559026af82000e46cde6f7dedc897b6/django/core/servers/basehttp.py#L24
You can’t perform that action at this time.
0 commit comments