Class: SemanticLogger::Appender::Graylog::LevelMap
- Inherits:
-
Object
- Object
- SemanticLogger::Appender::Graylog::LevelMap
- Defined in:
- lib/semantic_logger/appender/graylog.rb
Overview
Map Semantic Logger levels to Graylog levels
Instance Attribute Summary collapse
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#error ⇒ Object
Returns the value of attribute error.
-
#fatal ⇒ Object
Returns the value of attribute fatal.
-
#info ⇒ Object
Returns the value of attribute info.
-
#trace ⇒ Object
Returns the value of attribute trace.
-
#warn ⇒ Object
Returns the value of attribute warn.
Instance Method Summary collapse
- #[](level) ⇒ Object
-
#initialize(trace: GELF::DEBUG, debug: GELF::DEBUG, info: GELF::INFO, warn: GELF::WARN, error: GELF::ERROR, fatal: GELF::FATAL) ⇒ LevelMap
constructor
A new instance of LevelMap.
Constructor Details
#initialize(trace: GELF::DEBUG, debug: GELF::DEBUG, info: GELF::INFO, warn: GELF::WARN, error: GELF::ERROR, fatal: GELF::FATAL) ⇒ LevelMap
28 29 30 31 32 33 34 35 |
# File 'lib/semantic_logger/appender/graylog.rb', line 28 def initialize(trace: GELF::DEBUG, debug: GELF::DEBUG, info: GELF::INFO, warn: GELF::WARN, error: GELF::ERROR, fatal: GELF::FATAL) @trace = trace @debug = debug @info = info @warn = warn @error = error @fatal = fatal end |
Instance Attribute Details
#debug ⇒ Object
Returns the value of attribute debug.
26 27 28 |
# File 'lib/semantic_logger/appender/graylog.rb', line 26 def debug @debug end |
#error ⇒ Object
Returns the value of attribute error.
26 27 28 |
# File 'lib/semantic_logger/appender/graylog.rb', line 26 def error @error end |
#fatal ⇒ Object
Returns the value of attribute fatal.
26 27 28 |
# File 'lib/semantic_logger/appender/graylog.rb', line 26 def fatal @fatal end |
#info ⇒ Object
Returns the value of attribute info.
26 27 28 |
# File 'lib/semantic_logger/appender/graylog.rb', line 26 def info @info end |
#trace ⇒ Object
Returns the value of attribute trace.
26 27 28 |
# File 'lib/semantic_logger/appender/graylog.rb', line 26 def trace @trace end |
#warn ⇒ Object
Returns the value of attribute warn.
26 27 28 |
# File 'lib/semantic_logger/appender/graylog.rb', line 26 def warn @warn end |
Instance Method Details
#[](level) ⇒ Object
37 38 39 |
# File 'lib/semantic_logger/appender/graylog.rb', line 37 def [](level) public_send(level) end |