-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could internal log level be set by runtime? #1138
Comments
The original intention of the internal logger was to configure the custom error handler as specified in specs ( https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.x/specification/error-handling.md#configuring-error-handlers ) and not to use it for debugging/testing. So, the levels were kept compile-only, to ensure we have header-only logging. |
If the SDK allows user to register customized error handlers, then they can do any whatever filtering there like the dynamic log level, is this correct? |
Yes, but the custom handler will only receive the logs at the level configured during compile time. |
The java example in https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.x/specification/error-handling.md#configuring-error-handlers seems to use a global variable |
Yes, that would be good. Thanks. |
Could you please assign this to me? Thanks. |
Is your feature request related to a problem?
We usually need debug log when testing and integrating opentelemetry-cpp, and just need error log after that.But now the internal log level can only be set when compiling, which is usual WARNING.
Describe the solution you'd like
Maybe add
GlobalLogHandler::SetLogLevel(...)
or addlog_level
toGlobalLogHandler::SetLogHandler(...)
?The text was updated successfully, but these errors were encountered: