Class: Brogger
- Inherits:
-
Logger
- Object
- Logger
- Brogger
- Defined in:
- lib/brogger.rb,
lib/brogger/null.rb,
lib/brogger/version.rb,
lib/brogger/timestamp_formatter.rb
Defined Under Namespace
Classes: Null, TimestampFormatter
Constant Summary collapse
- LEVEL_MAPPING =
Low-level information for developers
{ debug: DEBUG, # Low-level information for developers error: ERROR, # A handleable error condition fatal: FATAL, # An unhandleable error that results in a program crash info: INFO, # Generic (useful) information about system operation unknown: UNKNOWN, # An unknown message that should always be logged warn: WARN # A warning }
- VERSION =
"0.1.0"
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Brogger
constructor
A new instance of Brogger.
- #level=(l) ⇒ Object
Constructor Details
#initialize ⇒ Brogger
Returns a new instance of Brogger.
16 17 18 19 |
# File 'lib/brogger.rb', line 16 def initialize(*) super self.formatter = TimestampFormatter.new end |
Class Method Details
.version ⇒ Object
4 |
# File 'lib/brogger/version.rb', line 4 def self.version; VERSION; end |
Instance Method Details
#level=(l) ⇒ Object
22 23 24 |
# File 'lib/brogger.rb', line 22 def level=(l) super (l.is_a?(Symbol) ? level_mapping.fetch(l, UNKNOWN) : l) end |