Skip to content

Commit

Permalink
chore: allow custom log formatter (#4513)
Browse files Browse the repository at this point in the history
  • Loading branch information
zawan-ila authored Dec 6, 2024
1 parent 3e1d67e commit c4599d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions course_discovery/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@
# Set up logging for development use (logging to stdout)
level = 'DEBUG' if DEBUG else 'INFO'
hostname = platform.node().split(".")[0]
LOGGING_FORMAT_STRING = ''

# Use a different address for Mac OS X
syslog_address = '/var/run/syslog' if platform.system().lower() == 'darwin' else '/dev/log'
Expand Down
4 changes: 2 additions & 2 deletions course_discovery/settings/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def get_docker_logger_config():
'disable_existing_loggers': False,
'formatters': {
'standard': {
'format': '%(asctime)s %(levelname)s %(process)d '
'[%(name)s] %(filename)s:%(lineno)d - %(message)s',
'format': LOGGING_FORMAT_STRING or '%(asctime)s %(levelname)s %(process)d '
'[%(name)s] %(filename)s:%(lineno)d - %(message)s'
},
'syslog_format': {'format': syslog_format},
'raw': {'format': '%(message)s'},
Expand Down

0 comments on commit c4599d9

Please sign in to comment.