Class: Yell::Adapters::Io
- Includes:
- Formatter::Helpers
- Defined in:
- lib/yell/adapters/io.rb
Constant Summary collapse
- Colors =
The possible unix log colors
{ 0 => "\e[32;1m", # green;bold # 1 => "\e[0m", # white 2 => "\e[33;1m", # yello;bold 3 => "\e[31;1m", # red;bold 4 => "\e[35;1m", # magenta;bold 5 => "\e[36m", # cyan -1 => "\e[0m" # NONE }
Instance Attribute Summary collapse
-
#colors ⇒ Object
Sets colored output on or off (default off).
-
#sync ⇒ Object
Sets the “sync mode” to true or false.
Attributes included from Formatter::Helpers
Attributes included from Level::Helpers
Instance Method Summary collapse
-
#colorize! ⇒ Object
Shortcut to enable colors.
Methods inherited from Base
close, #close, #initialize, #inspect, open, setup, write, #write
Constructor Details
This class inherits a constructor from Yell::Adapters::Base
Instance Attribute Details
#colors ⇒ Object
Sets colored output on or off (default off)
71 72 73 |
# File 'lib/yell/adapters/io.rb', line 71 def colors @colors end |
#sync ⇒ Object
Sets the “sync mode” to true or false.
When true (default), every log event is immediately written to the file. When false, the log event is buffered internally.
62 63 64 |
# File 'lib/yell/adapters/io.rb', line 62 def sync @sync end |
Instance Method Details
#colorize! ⇒ Object
Shortcut to enable colors.
77 |
# File 'lib/yell/adapters/io.rb', line 77 def colorize!; @colors = true; end |