Module: Bootlace::Logger
Instance Method Summary collapse
Instance Method Details
#logger ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/bootlace/logger.rb', line 5 def logger if ENV["TEST"] @logger ||= ::Logger.new('/tmp/bootlace.log') else @logger ||= ::Logger.new(STDOUT) end @logger.formatter = proc do |severity, datetime, progname, msg| "[bootlace] #{severity}: #{msg}\n" end @logger end |