cobalt
Console for ruby is: Colored, Nesting, Multiple, Smart logging management.
Installation
$ gem install cobalt
Usage
-
Try it yourself!
require 'rubygems' require 'cobalt' stdout = Logger.new(STDOUT) # log to std out, and but dont prefix with anything! stdout.formatter = proc { |severity, datetime, progname, msg| "#{msg}\n" } console = Cobalt::Console.new :loggers => [stdout] console.space console.log 'Initializing Console sample..' console.separator '-' console.indent console.notice 'notice' console.warn 'warn' console.error 'error' console.outdent console.space console.log 'Remember the color, for a few lines..' console.separator '=' console.color(:pink) do console.log 'all this' console.log 'will be' console.log 'colored pink' end console.space
Contributors
-
Fernando Trasviña
-
Pablo Antonio Gonzalez Cervantes
-
Kazuyoshi Tlacaelel
Copyright
Copyright © 2012 kazuyoshi tlacaelel. See LICENSE for details.
-