enum Crylog::Severity

Overview

Logging levels as defined by RFC 5424.

Defined in:

logger.cr

Enum Members

Debug = 100

Detailed debugging information.

Info = 200

Interesting events.

Examples: User logs in, SQL logs.

Notice = 250

Uncommon events.

Warning = 300

Exceptional occurrences that are not errors.

Examples: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.

Error = 400

Runtime errors.

Critical = 500

Critical conditions.

Example: Application component unavailable, unexpected exception.

Alert = 550

Action must be taken immediately.

Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.

Emergency = 600

Urgent alert.

Instance Method Summary

Instance Method Detail

def alert? #

[View source]
def critical? #

[View source]
def debug? #

[View source]
def emergency? #

[View source]
def error? #

[View source]
def info? #

[View source]
def notice? #

[View source]
def to_s #
Description copied from struct Enum

Returns a String representation of this enum member. In the case of regular enums, this is just the name of the member. In the case of flag enums, it's the names joined by vertical bars, or "None", if the value is zero.

If an enum's value doesn't match a member's value, the raw value is returned as a string.

Color::Red.to_s                     # => "Red"
IOMode::None.to_s                   # => "None"
(IOMode::Read | IOMode::Write).to_s # => "Read | Write"

Color.new(10).to_s # => "10"

[View source]
def warning? #

[View source]