Class: Bricky::Logger
- Inherits:
-
Logger
- Object
- Logger
- Bricky::Logger
- Defined in:
- lib/bricky/logger.rb
Instance Method Summary collapse
- #failure(*args) ⇒ Object
- #important(*args) ⇒ Object
-
#initialize ⇒ Logger
constructor
A new instance of Logger.
- #message(*args) ⇒ Object
- #normal(*args) ⇒ Object
Constructor Details
#initialize ⇒ Logger
Returns a new instance of Logger.
5 6 7 8 9 10 11 12 13 |
# File 'lib/bricky/logger.rb', line 5 def initialize STDOUT.sync = true super(STDOUT) self.level = INFO self.formatter = proc do |severity, datetime, progname, msg| "#{msg}\n" end end |
Instance Method Details
#failure(*args) ⇒ Object
19 20 21 |
# File 'lib/bricky/logger.rb', line 19 def failure(*args) error colorize_first(args, :white).on_red end |
#important(*args) ⇒ Object
23 24 25 |
# File 'lib/bricky/logger.rb', line 23 def important(*args) info colorize_first(args, :cyan) end |
#message(*args) ⇒ Object
15 16 17 |
# File 'lib/bricky/logger.rb', line 15 def (*args) info colorize_first(args, :blue) end |
#normal(*args) ⇒ Object
27 28 29 |
# File 'lib/bricky/logger.rb', line 27 def normal(*args) info colorize_first(args, :green) end |