Skip to main content

Module logging

Module logging 

Source
Expand description

logging stuffs, inspired by databend

Modulesยง

file_retention ๐Ÿ”’
File-log retention based on the total size of managed log files.

Structsยง

FileAppenderSnafu ๐Ÿ”’
SNAFU context selector for the InitLoggingError::FileAppender variant
LoggingOptions
The logging options that used to initialize the logger.
SlowQueryOptions
The options of slow query.
TraceContext ๐Ÿ”’
TraceLayer ๐Ÿ”’
An OTLP layer with a runtime switch and a stable address for downcasts.
TraceLayerState ๐Ÿ”’
TraceReloadHandle
TracingOptions

Enumsยง

InitLoggingError
Failure to initialize a file appender.
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_logging_layer ๐Ÿ”’
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
redacted_otlp_headers ๐Ÿ”’
serialize_otlp_headers ๐Ÿ”’

Type Aliasesยง

DynSubscriber ๐Ÿ”’
OtelTraceLayer ๐Ÿ”’