Skip to content

Commit

Permalink
fix comment on the initialization order
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Nov 14, 2022
1 parent a210c7a commit ad0415c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions sdk/include/opentelemetry/sdk/common/global_log_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,10 @@ class GlobalLogHandler
OPENTELEMETRY_END_NAMESPACE

/**
* We can not decide the destroying order of signaltons.
* Which means, the destructors of other singletons (GlobalLogHandler,TracerProvider and etc.)
* may be called after destroying of global LogHandler and use OTEL_INTERNAL_LOG_* in it.We can do
* nothing but ignore the log in this situation.
*/
* GlobalLogHandler and TracerProvider/MeterProvider/LoggerProvider are lazy sigletons.
* To ensure that GlobalLogHandler is the first one to be initialized (and so last to be
* destroyed), it is first used inside the constructors of TraceProvider, MeterProvider
* and LoggerProvider for debug logging. */
#define OTEL_INTERNAL_LOG_DISPATCH(level, message, attributes) \
do \
{ \
Expand Down

0 comments on commit ad0415c

Please sign in to comment.