]> git.r.bdr.sh - rbdr/cologne/blame - README.rdoc
Update README.rdoc
[rbdr/cologne] / README.rdoc
CommitLineData
7389a570 1= cobalt
2
89c5afeb 3Console for ruby is: Colored, Nesting, Multiple, Smart logging management.
4
5== Installation
6
7 $ gem install cobalt
8
9== Usage
10[http://github.com/ktlacaelel/cobalt/wiki/example.png]
11Try it yourself!
12
13 require 'rubygems'
14 require 'cobalt'
15
16 stdout = Logger.new(STDOUT) # log to std out, and but dont prefix with anything!
17 stdout.formatter = proc { |severity, datetime, progname, msg| "#{msg}\n" }
18
19 console = Cobalt::Console.new :loggers => [stdout]
20
21 console.space
22 console.log 'Initializing Console sample..'
23 console.separator '-'
24 console.indent
25 console.notice 'notice'
26 console.warn 'warn'
27 console.error 'error'
28 console.outdent
29
30 console.space
31 console.log 'Remember the color, for a few lines..'
32 console.separator '='
33 console.color(:pink) do
34 console.log 'all this'
35 console.log 'will be'
36 console.log 'colored pink'
37 end
38
39 console.space
40
41
7389a570 42
ddb7fc2f 43== Contributors
44
45* Fernando TrasviƱa
46* Pablo Antonio Gonzalez Cervantes
47* Kazuyoshi Tlacaelel
48
7389a570 49== Copyright
50
51Copyright (c) 2012 kazuyoshi tlacaelel. See LICENSE for details.