Expand description
logging stuffs, inspired by databend
Structsยง
- Logging
Options - The logging options that used to initialize the logger.
- Slow
Query Options - The options of slow query.
- Trace
Context ๐ - Trace
Layer ๐ - A tracing layer that can be dynamically reloaded.
- Trace
Reload Handle - Tracing
Options
Enumsยง
- LogFormat
- Otlp
Export Protocol - The protocol of OTLP export.
- Slow
Queries Record Type - Trace
State ๐
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 ๐
- Otel
Trace ๐Layer