Skip to content

Commit

Permalink
fix(logger): unset CORVA_LOGGER.propagate = False for OTel Log Send…
Browse files Browse the repository at this point in the history
  • Loading branch information
smoke committed Nov 6, 2024
1 parent f0125c1 commit a0d0e07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Unset the `CORVA_LOGGER.propagate = False`, so the OTel handler will be able to collect and send those logs as well
refs https://github.com/corva-ai/otel/pull/37



## [1.11.4] - 2024-02-08
Expand Down
6 changes: 5 additions & 1 deletion src/corva/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@

CORVA_LOGGER = logging.getLogger('corva')
CORVA_LOGGER.setLevel(SETTINGS.LOG_LEVEL)
CORVA_LOGGER.propagate = False # do not pass messages to ancestor loggers

# unset to pass messages to ancestor loggers, including OTel Log Sending handler
# see https://github.com/corva-ai/otel/pull/37
# see https://corvaqa.atlassian.net/browse/EE-31
# CORVA_LOGGER.propagate = False


def get_formatter(
Expand Down

0 comments on commit a0d0e07

Please sign in to comment.