Skip to content
Colored, Nesting, Multiple logging management.
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION
cobalt.gemspec

README.rdoc

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.

Something went wrong with that request. Please try again.