Sha256: d2d27986c89f3d6210caa3e4509bdd21ac30deccd693640480090c0ebfc46826
Contents?: true
Size: 690 Bytes
Versions: 13
Compression:
Stored size: 690 Bytes
Contents
require 'logging' module Onceover::Logger def logger unless $logger # here we setup a color scheme called 'bright' Logging.color_scheme( 'bright', :levels => { :debug => :cyan, :info => :green, :warn => :yellow, :error => :red, :fatal => [:white, :on_red] } ) Logging.appenders.stdout( 'stdout', :layout => Logging.layouts.pattern( :pattern => '%l\t -> %m\n', :color_scheme => 'bright' ) ) $logger = Logging.logger['Colors'] $logger.add_appenders 'stdout' $logger.level = :info end $logger end end
Version data entries
13 entries across 13 versions & 1 rubygems