Class: Logger::Better
- Includes:
- LevelPatch
- Defined in:
- lib/logger-better.rb
Defined Under Namespace
Modules: LevelPatch Classes: NoTimestampFormatter, TimestampFormatter
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Better
constructor
A new instance of Better.
Methods included from LevelPatch
Methods included from NoTimestampPatch
Methods included from BetterPatch
Constructor Details
#initialize ⇒ Better
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 (*args, &block) new(*args, &block).tap do |logger| logger.formatter = NoTimestampFormatter.new end end |