Class: Statistrano::Log::DefaultLogger
- Inherits:
-
Object
- Object
- Statistrano::Log::DefaultLogger
- Defined in:
- lib/statistrano/log/default_logger.rb
Overview
Error, Warning and Message Logging
Defined Under Namespace
Classes: Formatter
Instance Method Summary collapse
- #error(*msg) ⇒ Object (also: #fatal)
- #info(*msg) ⇒ Object (also: #debug)
- #warn(*msg) ⇒ Object
Instance Method Details
#error(*msg) ⇒ Object Also known as: fatal
27 28 29 30 |
# File 'lib/statistrano/log/default_logger.rb', line 27 def error *msg status, msg = extract_status "error", *msg to_stderr status, :red, *msg end |
#info(*msg) ⇒ Object Also known as: debug
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/statistrano/log/default_logger.rb', line 8 def info *msg status, msg = extract_status "", *msg case status when :success then color = :green else color = :bright end to_stdout status, color, *msg end |
#warn(*msg) ⇒ Object
22 23 24 25 |
# File 'lib/statistrano/log/default_logger.rb', line 22 def warn *msg status, msg = extract_status "warning", *msg to_stdout status, :yellow, *msg end |