Module: Suture::Adapter::Log
- Included in:
- Dictaphone, ChoosesSurgeon, Surgeon::Auditor, TestsPatient, Util::Scalpel
- Defined in:
- lib/suture/adapter/log.rb
Class Method Summary collapse
Instance Method Summary collapse
- #log_debug(*args, &blk) ⇒ Object
- #log_error(*args, &blk) ⇒ Object
- #log_info(*args, &blk) ⇒ Object
- #log_warn(*args, &blk) ⇒ Object
Class Method Details
.logger ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/suture/adapter/log.rb', line 6 def self.logger if !defined?(@setup) || !@setup @logger = Suture::Wrap::Logger.init(Suture.config.merge(Suture::Util::Env.to_map)) @setup = true end @logger end |
.reset! ⇒ Object
14 15 16 17 |
# File 'lib/suture/adapter/log.rb', line 14 def self.reset! @setup = nil @logger = nil end |
Instance Method Details
#log_debug(*args, &blk) ⇒ Object
19 20 21 |
# File 'lib/suture/adapter/log.rb', line 19 def log_debug(*args, &blk) Log.logger.debug(*args, &blk) end |
#log_error(*args, &blk) ⇒ Object
31 32 33 |
# File 'lib/suture/adapter/log.rb', line 31 def log_error(*args, &blk) Log.logger.error(*args, &blk) end |