Skip to content

Commit

Permalink
Merge pull request #1 from narenjcs/set_loguru_extra_to_custom_dimens…
Browse files Browse the repository at this point in the history
…ions

Set loguru extra to custom dimensions
  • Loading branch information
narenjcs committed Jun 20, 2023
2 parents 3a2d8df + cc881a0 commit fe097e9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ def log_record_to_envelope(self, record):
if (hasattr(record, 'custom_dimensions') and
isinstance(record.custom_dimensions, dict)):
properties.update(record.custom_dimensions)
elif (hasattr(record, 'extra') and
isinstance(record.extra, dict)):
properties.update(record.extra)

if record.exc_info:
exctype, _value, tb = record.exc_info
Expand Down Expand Up @@ -273,6 +276,9 @@ def log_record_to_envelope(self, record):
if (hasattr(record, 'custom_dimensions') and
isinstance(record.custom_dimensions, dict)):
properties.update(record.custom_dimensions)
elif (hasattr(record, 'extra') and
isinstance(record.extra, dict)):
properties.update(record.extra)

measurements = {}
if (hasattr(record, 'custom_measurements') and
Expand Down

0 comments on commit fe097e9

Please sign in to comment.