Module: Sutazekarate::Logging

Included in:
Category, Competition, Competition
Defined in:
lib/sutazekarate/logging.rb

Instance Method Summary collapse

Instance Method Details

#loggerObject



5
6
7
8
9
10
# File 'lib/sutazekarate/logging.rb', line 5

def logger
  @logger ||= ActiveSupport::Logger.new(STDERR)
    .tap { |logger| logger.formatter = ::Logger::Formatter.new }
    .then { |logger| ActiveSupport::TaggedLogging.new(logger) }
    .then { |logger| logger.tagged(self.class.to_s) }
end