Project

cobalt

0.0
No commit activity in last 3 years
No release in over 3 years
Colored, Nesting, Multiple logging management.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

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 © 2012 kazuyoshi tlacaelel. See LICENSE for details.