Skip to content

Commit

Permalink
Merge pull request #364 from edx/ilee2u/log_format
Browse files Browse the repository at this point in the history
chore: Refactor logging format for Datadog pipeline integration
  • Loading branch information
ilee2u authored Dec 19, 2024
2 parents 795a7ae + a0e7f78 commit 2c263bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions designer/settings/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def get_env_setting(setting):
error_msg = "Set the [%s] env variable!" % setting
raise ImproperlyConfigured(error_msg)


def get_logger_config(log_dir='/var/tmp',
logging_env="no_env",
edx_filename="edx.log",
Expand Down Expand Up @@ -51,8 +52,8 @@ def get_logger_config(log_dir='/var/tmp',
'disable_existing_loggers': False,
'formatters': {
'standard': {
'format': '%(asctime)s %(levelname)s %(process)d '
'[%(name)s] %(filename)s:%(lineno)d - %(message)s',
'format': '%(asctime)s %(levelname)s [%(name)s] [%(filename)s:%(lineno)d] '
'[dd.trace_id=%(dd.trace_id)s dd.span_id=%(dd.span_id)s] - %(message)s',
},
'syslog_format': {'format': syslog_format},
'raw': {'format': '%(message)s'},
Expand Down

0 comments on commit 2c263bc

Please sign in to comment.