Skip to content

Commit 8fade64

Browse files
committed
Update logger level to NOTSET in logs example
1 parent 6ed676a commit 8fade64

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/examples/logs/example.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
logger_provider.add_log_record_processor(BatchLogRecordProcessor(exporter))
3434
handler = LoggingHandler(level=logging.NOTSET, logger_provider=logger_provider)
3535

36+
# Set the root logger level to NOTSET to ensure all messages are captured
37+
logging.getLogger().setLevel(logging.NOTSET)
38+
3639
# Attach OTLP handler to root logger
3740
logging.getLogger().addHandler(handler)
3841

0 commit comments

Comments
 (0)