Sha256: 702dfc1cd23857c92e34b7634cc805f76b9e48d541d7df0a10b3ad1fcd3062a5

Contents?: true

Size: 509 Bytes

Versions: 24

Compression:

Stored size: 509 Bytes

Contents

require 'log4r-color'

unless $logger
  Log4r::Logger.root.level = ENV['DEBUG'] ? Log4r::DEBUG : (ENV['VERBOSE'] ? Log4r::INFO : Log4r::WARN)

  Log4r::ColorOutputter.new 'color', {
    :colors => { 
      :debug  => :black, 
      :info   => :blue, 
      :warn   => :yellow, 
      :error  => :red, 
      :fatal  => {:color => :red, :background => :white} 
    },
    :formatter => Log4r::PatternFormatter.new(:pattern => "%l %m")
  }

  $logger = Log4r::Logger.new('babelyoda')
  $logger.add('color')
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
babelyoda-2.1.18 lib/babelyoda/logger.rb
babelyoda-2.1.17 lib/babelyoda/logger.rb
babelyoda-2.1.16 lib/babelyoda/logger.rb
babelyoda-2.1.15 lib/babelyoda/logger.rb
babelyoda-2.1.14 lib/babelyoda/logger.rb
babelyoda-2.1.13 lib/babelyoda/logger.rb
babelyoda-2.1.12 lib/babelyoda/logger.rb
babelyoda-2.1.11 lib/babelyoda/logger.rb
babelyoda-2.1.10 lib/babelyoda/logger.rb
babelyoda-2.1.9 lib/babelyoda/logger.rb
babelyoda-2.1.8 lib/babelyoda/logger.rb
babelyoda-2.1.7 lib/babelyoda/logger.rb
babelyoda-2.1.6 lib/babelyoda/logger.rb
babelyoda-2.1.5 lib/babelyoda/logger.rb
babelyoda-2.1.4 lib/babelyoda/logger.rb
babelyoda-2.1.3 lib/babelyoda/logger.rb
babelyoda-2.1.2 lib/babelyoda/logger.rb
babelyoda-2.1.1 lib/babelyoda/logger.rb
babelyoda-2.1.0 lib/babelyoda/logger.rb
babelyoda-2.0.7 lib/babelyoda/logger.rb