Class: Logger::Better

Inherits:
Logger
  • Object
show all
Includes:
LevelPatch
Defined in:
lib/logger-better.rb

Defined Under Namespace

Modules: LevelPatch Classes: NoTimestampFormatter, TimestampFormatter

Class Method Summary collapse

Instance Method Summary collapse

Methods included from LevelPatch

#level=, #mapping

Methods included from NoTimestampPatch

included

Methods included from BetterPatch

included

Constructor Details

#initializeBetter

Returns a new instance of Better.



39
40
41
42
# File 'lib/logger-better.rb', line 39

def initialize(*)
  super
  @formatter = TimestampFormatter.new
end

Class Method Details

.no_timestamp(*args, &block) ⇒ Object



32
33
34
35
36
# File 'lib/logger-better.rb', line 32

def no_timestamp(*args, &block)
  new(*args, &block).tap do |logger|
    logger.formatter = NoTimestampFormatter.new
  end
end