Class: Logasm
- Inherits:
-
Object
- Object
- Logasm
- Defined in:
- lib/logasm.rb,
lib/logasm/adapters.rb,
lib/logasm/adapters/stdout_adapter.rb,
lib/logasm/adapters/logstash_adapter.rb,
lib/logasm/adapters/logstash_adapter/formatter.rb
Defined Under Namespace
Modules: Adapters
Class Method Summary collapse
Instance Method Summary collapse
- #debug(*args) ⇒ Object
- #error(*args) ⇒ Object
- #fatal(*args) ⇒ Object
- #info(*args) ⇒ Object
-
#initialize(adapters) ⇒ Logasm
constructor
A new instance of Logasm.
- #warn(*args) ⇒ Object
Constructor Details
#initialize(adapters) ⇒ Logasm
Returns a new instance of Logasm.
17 18 19 |
# File 'lib/logasm.rb', line 17 def initialize(adapters) @adapters = adapters end |
Class Method Details
.build(service_name, loggers_config) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/logasm.rb', line 9 def self.build(service_name, loggers_config) loggers_config ||= {stdout: nil} adapters = loggers_config.map do |type, arguments| Adapters.get(type.to_s, service_name, arguments || {}) end new(adapters) end |
Instance Method Details
#debug(*args) ⇒ Object
21 22 23 |
# File 'lib/logasm.rb', line 21 def debug(*args) log :debug, *args end |
#error(*args) ⇒ Object
33 34 35 |
# File 'lib/logasm.rb', line 33 def error(*args) log :error, *args end |
#fatal(*args) ⇒ Object
37 38 39 |
# File 'lib/logasm.rb', line 37 def fatal(*args) log :fatal, *args end |
#info(*args) ⇒ Object
25 26 27 |
# File 'lib/logasm.rb', line 25 def info(*args) log :info, *args end |
#warn(*args) ⇒ Object
29 30 31 |
# File 'lib/logasm.rb', line 29 def warn(*args) log :warn, *args end |