class
Godot::LogChannel
- Godot::LogChannel
- Reference
- Object
Overview
=========================================================================== User-Defined Log Channel with Status & Custom Filtering
A LogChannel represents a dedicated diagnostic category (e.g. "Public", "Network", "Gameplay", "Combat").
Channels allow users to:
- Define custom status (e.g. "active", "public_safe", "muted", "quarantined").
- Attach channel-level filters (e.g. error-only filter + custom public filter).
- Restrict minimum log level per channel.
- Attach dedicated channel sinks (e.g. log/public.log). ===========================================================================
Defined in:
libgodot/logging/channel.crConstructors
Instance Method Summary
- #add_filter(&block : LogFilterProc) : Void
- #add_filter(filter : LogFilterProc) : Void
-
#add_filter(named_filter : String) : Void
Attach a globally registered named filter (e.g.
- #add_sink(sink : LogSink) : Void
- #clear_filters : Void
- #debug(message : String, tags : Array(String) = [] of String, status : String = "") : Void
-
#dispatch_sinks(record : LogRecord) : Void
Dispatches directly to this channel's dedicated sinks (if any)
- #enabled=(enabled : Bool)
- #enabled? : Bool
- #error(message : String, tags : Array(String) = [] of String, status : String = "") : Void
- #filters : Array(LogFilterProc)
- #info(message : String, tags : Array(String) = [] of String, status : String = "") : Void
-
#log(level : LogLevel, message : String, file : String = "", line : Int32 = 0, func : String = "", tags : Array(String) = [] of String, status : String = "") : Void
Ergonomic channel-level logging methods
- #min_level : LogLevel
- #min_level=(min_level : LogLevel)
- #mute! : Void
- #name : String
-
#passes_filters?(record : LogRecord) : Bool
Evaluates whether a log record passes this channel's level, status, and custom filters
- #remove_sink(sink : LogSink) : Void
- #sinks : Array(LogSink)
- #status : String
- #status=(status : String)
- #status?(expected : String) : Bool
- #trace(message : String, tags : Array(String) = [] of String, status : String = "") : Void
- #unmute! : Void
- #warn(message : String, tags : Array(String) = [] of String, status : String = "") : Void
Constructor Detail
Instance Method Detail
Attach a globally registered named filter (e.g. "public", "safe", "no_spoilers")
Dispatches directly to this channel's dedicated sinks (if any)
def log(level : LogLevel, message : String, file : String = "", line : Int32 = 0, func : String = "", tags : Array(String) = [] of String, status : String = "") : Void
#
Ergonomic channel-level logging methods
Evaluates whether a log record passes this channel's level, status, and custom filters