Categories: None [Edit]

fancy_logger

https://rubygems.org/gems/fancy_logger
https://github.com/RyanScottLewis/fancy_logger
# Fancy Logger An easily customizable logger with style. ## Install ### Bundler: `gem 'fancy_logger'` ### RubyGems: `gem install fancy_logger` ## Usage Simply use as if you were using the normal Ruby `Logger` class: ```ruby require 'fancy_logger' logger = FancyLogger.new(STDOUT) logger.info "Hello" ``` ### Config The `config` instance method allows you to modify the configuration of the Logger within a DSL. Continuing with our last example: ```ruby logger.config do timestamp_format "%c" styles do info do foreground :yellow blink true end end end logger.debug 'Look here!' logger.info 'Doing things...' logger.warn 'Watch out!' logger.error 'Bad' logger.fatal 'VERY bad' logger.unknown 'Weird unknown stuff' ``` #### Output ![][output_example] ### Config ```ruby # The format of the timestamp in the log. Follows the strftime standards. timestamp_format "%F %r" # On the first logged message, FancyLogger will prepend a help message # containing a list of all the severities (debug, info, warn, etc) styled # according to your config as reference. # You can disable this by setting the below option to false. show_help_message true # Under styles, you have a configuration for each severity. # Each severity has a configuration with the following valid options: # Key: foreground # Value: # :default, :black, :red, :green, :yellow, :blue, :magenta, :cyan, :white # # Key: background # Value: # :default, :black, :red, :green, :yellow, :blue, :magenta, :cyan, :white # # Key: reset # Value: true or false # # Key: bright # Value: true or false # # Key: italic # Value: true or false # # Key: underline # Value: true or false # # Key: # blink # Value: true or false # # Key: inverse # Value: true or false # # Key: hide # Value: true or false styles do debug do foreground :black background :cyan end info do foreground :default background :default end warn do foreground :yel...

Total

Ranking: 74,984 of 186,974
Downloads: 12,233

Daily

Ranking: 66,856 of 186,960
Downloads: 7

Depended by

RankDownloadsName
5,5591,064,175jquery-cookie-rails
82,61410,580morris-rails

Depends on

RankDownloadsName
101,140,919,622rake
55602,224,954rainbow
91441,535,046rb-fsevent
385115,496,776guard-rspec
411108,902,859redcarpet
75666,928,218fuubar
1,31330,518,047github-markup
4,1912,078,184version
7,109579,255guard-yard
38,13831,043outline
41,16128,115at

Owners

#GravatarHandle
1iconRyanScottLewis