Module logging

Module logging 

Source
Expand description

logging stuffs, inspired by databend

Structsยง

LoggingOptions
The logging options that used to initialize the logger.
SlowQueryOptions
The options of slow query.
TraceContext ๐Ÿ”’
TraceLayer ๐Ÿ”’
A tracing layer that can be dynamically reloaded.
TraceReloadHandle
TracingOptions

Enumsยง

LogFormat
OtlpExportProtocol
The protocol of OTLP export.
SlowQueriesRecordType
TraceState ๐Ÿ”’

Constantsยง

DEFAULT_LOGGING_DIR
The default logs directory.
DEFAULT_LOG_TARGETS ๐Ÿ”’
DEFAULT_OTLP_GRPC_ENDPOINT
The default endpoint when use gRPC exporter protocol.
DEFAULT_OTLP_HTTP_ENDPOINT
The default endpoint when use HTTP exporter protocol.

Staticsยง

GLOBAL_UT_LOG_GUARD ๐Ÿ”’
LOG_RELOAD_HANDLE
Handle for reloading log level
TRACER ๐Ÿ”’
TRACE_RELOAD_HANDLE
Handle for reloading trace level

Functionsยง

build_otlp_exporter ๐Ÿ”’
build_slow_query_logger ๐Ÿ”’
create_tracer ๐Ÿ”’
get_or_init_tracer
Ensure that the OTLP tracer has been constructed, building it lazily if needed.
init_default_ut_logging
Init tracing for unittest. Write logs to file unittest.
init_global_logging

Type Aliasesยง

DynSubscriber ๐Ÿ”’
OtelTraceLayer ๐Ÿ”’