Sha256: 5a5675612d40ac4e97f83cb57a3d1513b4cf626c3b09b279ff136a3cb4462dac

Contents?: true

Size: 1.09 KB

Versions: 2

Compression:

Stored size: 1.09 KB

Contents

= cobalt

Console for ruby is: Colored, Nesting, Multiple, Smart logging management.

== Installation

    $ gem install cobalt

== Usage
[http://github.com/ktlacaelel/cobalt/wiki/example.png]
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 (c) 2012 kazuyoshi tlacaelel. See LICENSE for details.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cobalt-0.1.1 README.rdoc
cobalt-0.1.0 README.rdoc