enum
Godot::LogLevel
Overview
LogLevel: Unified typed enum containing core severity levels and user-defined log categories.
Defined in:
libgodot/logging/filter.crEnum Members
-
Off =
0_u8 -
Error =
1_u8 -
Warn =
2_u8 -
Info =
3_u8 -
Debug =
4_u8 -
Trace =
5_u8 -
Internal =
6_u8
Class Method Summary
-
.all_name_tags : Array(String)
Returns all registered clean uppercase name tags
-
.all_tags : Array(String)
Returns all registered bracketed tag strings
-
.from_line(line : String, default : LogLevel | Nil = nil) : LogLevel | Nil
Scans a raw log line string and extracts the matching enum category if present.
-
.parse?(str : String) : LogLevel | Nil
Case-insensitive parser supporting names, tags, numbers, and aliases
Instance Method Summary
-
#<(other : LogLevel) : Bool
Compares this object to other based on the receiver’s
<=>method, returningtrueif it returns a negative number. -
#<=(other : LogLevel) : Bool
Compares this object to other based on the receiver’s
<=>method, returningtrueif it returns a value equal or less then0. -
#<=>(other : LogLevel) : Int32
The comparison operator.
-
#>(other : LogLevel) : Bool
Compares this object to other based on the receiver’s
<=>method, returningtrueif it returns a value greater then0. -
#>=(other : LogLevel) : Bool
Compares this object to other based on the receiver’s
<=>method, returningtrueif it returns a value equal or greater than0. -
#ansi_color : String
Returns the ANSI color escape sequence for terminal output
-
#color_bbcode : String
Returns the BBCode color string for rich UI display (e.g.
-
#debug?
Returns
trueif this enum value equalsDebug -
#error?
Returns
trueif this enum value equalsError -
#info?
Returns
trueif this enum value equalsInfo -
#internal?
Returns
trueif this enum value equalsInternal -
#name_tag : String
Returns the clean uppercase identifier tag (e.g.
-
#off?
Returns
trueif this enum value equalsOff -
#severity : Int32
Returns the numeric severity level (1: Error, 2: Warn, 3: Info, 4: Debug, 5: Trace, etc.)
-
#tag : String
Returns the bracketed log tag (e.g.
-
#trace?
Returns
trueif this enum value equalsTrace -
#warn?
Returns
trueif this enum value equalsWarn
Class Method Detail
Scans a raw log line string and extracts the matching enum category if present. User-defined custom tags are evaluated first so specific categories (like {spoiler}) take precedence over generic severity tags (like [INFO]).
Case-insensitive parser supporting names, tags, numbers, and aliases
Instance Method Detail
Compares this object to other based on the receiver’s <=> method,
returning true if it returns a negative number.
Compares this object to other based on the receiver’s <=> method,
returning true if it returns a value equal or less then 0.
The comparison operator. Returns 0 if the two objects are equal,
a negative number if this object is considered less than other,
a positive number if this object is considered greater than other,
or nil if the two objects are not comparable.
Subclasses define this method to provide class-specific ordering.
The comparison operator is usually used to sort values:
# Sort in a descending way:
[3, 1, 2].sort { |x, y| y <=> x } # => [3, 2, 1]
# Sort in an ascending way:
[3, 1, 2].sort { |x, y| x <=> y } # => [1, 2, 3]
Compares this object to other based on the receiver’s <=> method,
returning true if it returns a value greater then 0.
Compares this object to other based on the receiver’s <=> method,
returning true if it returns a value equal or greater than 0.
Returns the numeric severity level (1: Error, 2: Warn, 3: Info, 4: Debug, 5: Trace, etc.)