Class: ActiveLogger::Formatters::Syslog::LevelMap
- Inherits:
-
Object
- Object
- ActiveLogger::Formatters::Syslog::LevelMap
- Defined in:
- lib/active_logger/formatters/syslog.rb
Overview
:nodoc:
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(debug: ::Syslog::LOG_DEBUG, info: ::Syslog::LOG_INFO, warn: ::Syslog::LOG_WARNING, error: ::Syslog::LOG_ERR, fatal: ::Syslog::LOG_CRIT) ⇒ LevelMap
constructor
A new instance of LevelMap.
Constructor Details
#initialize(debug: ::Syslog::LOG_DEBUG, info: ::Syslog::LOG_INFO, warn: ::Syslog::LOG_WARNING, error: ::Syslog::LOG_ERR, fatal: ::Syslog::LOG_CRIT) ⇒ LevelMap
Returns a new instance of LevelMap.
14 15 16 17 18 19 20 |
# File 'lib/active_logger/formatters/syslog.rb', line 14 def initialize(debug: ::Syslog::LOG_DEBUG, info: ::Syslog::LOG_INFO, warn: ::Syslog::LOG_WARNING, error: ::Syslog::LOG_ERR, fatal: ::Syslog::LOG_CRIT) @debug = debug @info = info @warn = warn @error = error @fatal = fatal end |
Instance Attribute Details
#debug ⇒ Object
Returns the value of attribute debug.
12 13 14 |
# File 'lib/active_logger/formatters/syslog.rb', line 12 def debug @debug end |
#error ⇒ Object
Returns the value of attribute error.
12 13 14 |
# File 'lib/active_logger/formatters/syslog.rb', line 12 def error @error end |
#fatal ⇒ Object
Returns the value of attribute fatal.
12 13 14 |
# File 'lib/active_logger/formatters/syslog.rb', line 12 def fatal @fatal end |
#info ⇒ Object
Returns the value of attribute info.
12 13 14 |
# File 'lib/active_logger/formatters/syslog.rb', line 12 def info @info end |
#trace ⇒ Object
Returns the value of attribute trace.
12 13 14 |
# File 'lib/active_logger/formatters/syslog.rb', line 12 def trace @trace end |
#warn ⇒ Object
Returns the value of attribute warn.
12 13 14 |
# File 'lib/active_logger/formatters/syslog.rb', line 12 def warn @warn end |
Instance Method Details
#[](level) ⇒ Object
22 23 24 |
# File 'lib/active_logger/formatters/syslog.rb', line 22 def [](level) public_send(level.to_s.downcase) end |