Introduction of new api.diag global logger as discussed during SIG meetings and linked to #1754
Basic outline
- Provide a top-level diagnostic logger from the API as
api.diag with methods like api.diag.warn, api.diag.debug, etc.
- diag logger is no-op by default
- register a default logging implementation by calling api.diag.setLogger(loggingImpl)
Part 1
- For now we should keep but deprecate direct use of the NoopLogger and ConsoleLogger classes
Part 2
Will include breaking changes
- Once contrib is changed to use api.diag, these exports will be removed, this will require that they stop using local Logger instances
- This will also have breaking changes for
- Configuration definitions that use api.Logger and core.LogLevel
- Functions that currently get or pass api.Logger instances
- The type of the environment OTEL_LOG_LEVEL