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

Class Method Details

.loggerObject



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

#log_info(*args, &blk) ⇒ Object



23
24
25
# File 'lib/suture/adapter/log.rb', line 23

def log_info(*args, &blk)
  Log.logger.info(*args, &blk)
end

#log_warn(*args, &blk) ⇒ Object



27
28
29
# File 'lib/suture/adapter/log.rb', line 27

def log_warn(*args, &blk)
  Log.logger.warn(*args, &blk)
end