Fix exception thrown when LoggerProvider not configured by lzchen · Pull Request #3423 · open-telemetry/opentelemetry-python
Conversation
If a LoggerHandler is instantiated without an SDK LoggerProvider, an exception is thrown here since NoOpLogger does not have the resource attribute.
Repro:
... # do not set SDK Loggerprovider handler = LoggingHandler(level=logging.NOTSET) logging.getLogger().addHandler(handler) logging.info("Jackdaws love my big sphinx of quartz.") ...
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters