Module: GELF::Levels

Included in:
GELF
Defined in:
lib/gelf/severity.rb

Overview

There are two things you should know about log levels/severity:

- syslog defines levels from 0 (Emergency) to 7 (Debug).
  0 (Emergency) and 1 (Alert) levels are reserved for OS kernel.
- Ruby default Logger defines levels from 0 (DEBUG) to 4 (FATAL) and 5 (UNKNOWN).
  Note that order is inverted.

For compatibility we define our constants as Ruby Logger, and convert values before generating GELF message, using defined mapping.

Constant Summary collapse

DEBUG =
0
INFO =
1
WARN =
2
ERROR =
3
FATAL =
4
UNKNOWN =
5
EMERGENCY =

Additional native syslog severities. These will work in direct mapping mode only, for compatibility with syslog sources unrelated to Logger.

10
ALERT =
11
CRITICAL =
12
WARNING =
14
NOTICE =
15
INFORMATIONAL =
16