class
Godot::DiagnosticLogger
- Godot::DiagnosticLogger
- Reference
- Object
Overview
=========================================================================== Central Thread-Safe Diagnostic Logging Dispatcher with User-Defined Filters
Manages log channels, custom status filtering, multi-sink routing, and public/safe sanitization.
Defined in:
libgodot/logging/logger.crConstructors
Class Method Summary
-
.channel(name : String) : LogChannel
Access or create a named log channel
- .channel_names : Array(String)
-
.configure_channel(name : String, status : String = "active", min_level : LogLevel | Nil = nil, &block : LogChannel -> ) : LogChannel
Configures a channel with custom status, minimum level, and user-defined filter procs
- .dispatch(level : LogLevel, channel : String, message : String, file : String = "", line : Int32 = 0, function : String = "", tags : Array(String) = [] of String, status : String = "") : Void
- .filter_names : Array(String)
- .named_filter(name : String) : LogFilterProc | Nil
-
.register_filter(name : String, &block : LogFilterProc) : Void
Register a named filter globally (e.g.
- .register_filter(name : String, filter : LogFilterProc) : Void
Instance Method Summary
- #add_sink(sink : LogSink) : Void
- #close : Void
- #console_sink : GodotConsoleSink
-
#create_channel_sink(channel_name : String, path : String | Path = "log/#{channel_name}.log", min_level : LogLevel = LogLevel::Trace, &block : FileLogSink -> ) : FileLogSink
Creates a dedicated file sink for a specific channel
-
#create_public_sink(path : String | Path = "log/public.log", min_level : LogLevel = LogLevel::Trace) : FileLogSink
Creates and registers a public log sink that only captures errors and public-tagged records, preventing leakage of secret game information.
-
#dispatch(level : LogLevel, channel : String, message : String, file : String = "", line : Int32 = 0, function : String = "", tags : Array(String) = [] of String, status : String = "") : Void
Dispatches a structured log message across registered channels and sinks
- #file_sink : FileLogSink | Nil
- #flush : Void
- #min_level : LogLevel
- #min_level=(min_level : LogLevel)
- #remove_sink(sink : LogSink) : Void
- #ring_buffer : MemoryRingBufferSink
- #set_file_destination(path : String | Path) : Void
- #sinks : Array(LogSink)
Constructor Detail
Class Method Detail
Configures a channel with custom status, minimum level, and user-defined filter procs
Register a named filter globally (e.g. "public", "safe", "security", "telemetry")
Instance Method Detail
Creates a dedicated file sink for a specific channel
Creates and registers a public log sink that only captures errors and public-tagged records, preventing leakage of secret game information.