Skip to content

Commit

Permalink
Add formatter to otel handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnestoLoma committed Dec 31, 2024
1 parent 483566b commit 8265530
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyatlan/pkg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,9 @@ def add_otel_handler(

otel_handler = LoggingHandler(level=level, logger_provider=logger_provider)
otel_handler.setLevel(level)
formatter = logging.Formatter(
"%(asctime)s - %(name)s - %(levelname)s - %(message)s"
)
otel_handler.setFormatter(formatter)
logger.addHandler(otel_handler)
logger.info("OpenTelemetry handler added to the logger.")

0 comments on commit 8265530

Please sign in to comment.