Skip to content

Conversation

@lzchen
Copy link
Contributor

@lzchen lzchen commented Sep 1, 2023

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.")
...

@lzchen lzchen requested a review from a team September 1, 2023 20:45
Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments

Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@lzchen lzchen merged commit 6070a0d into open-telemetry:main Sep 7, 2023
@lzchen lzchen deleted the logs branch September 7, 2023 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants