enum

Tracing::Core::Level

Inherits Enum < Comparable < Value < Object

Describes the level of verbosity of a span or event.

Levels which are more verbose are considered "greater than" levels with ERROR as the lowest and TRACE as the highest.

Numeric values are inverted (TRACE=0, ERROR=4) for optimized integer comparisons. LevelFilter::OFF has a numeric value of 5.

Constants

TRACE = 0_u64
DEBUG = 1_u64
INFO = 2_u64
WARN = 3_u64
ERROR = 4_u64

Constructors

parse(s : String) : self
Source

Instance methods

<(other : Level) : Bool

Compares this object to other based on the receiver’s <=> method, returning true if it returns a negative number.

Source
<(other : LevelFilter) : Bool
Source
<=(other : Level) : Bool

Compares this object to other based on the receiver’s <=> method, returning true if it returns a value equal or less then 0.

Source
<=(other : LevelFilter) : Bool
Source
<=>(other : Level) : Int32

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]
Source
==(other : LevelFilter) : Bool
Source
>(other : Level) : Bool

Compares this object to other based on the receiver’s <=> method, returning true if it returns a value greater then 0.

Source
>(other : LevelFilter) : Bool
Source
>=(other : Level) : Bool

Compares this object to other based on the receiver’s <=> method, returning true if it returns a value equal or greater than 0.

Source
>=(other : LevelFilter) : Bool
Source
as_str
Source
debug?

Returns true if this enum value equals DEBUG

Source
error?

Returns true if this enum value equals ERROR

Source
info?

Returns true if this enum value equals INFO

Source
to_s(io : IO) : Nil

Appends a String representation of this enum member to the given io.

See also: to_s.

Source
trace?

Returns true if this enum value equals TRACE

Source
warn?

Returns true if this enum value equals WARN

Source