Module: Zoology::Logging
- Included in:
- Client, PathCache, PathCache::Watcher
- Defined in:
- lib/zoology/logging.rb
Class Attribute Summary collapse
-
.level ⇒ Object
Returns the value of attribute level.
Class Method Summary collapse
Instance Method Summary collapse
Class Attribute Details
.level ⇒ Object
Returns the value of attribute level.
11 12 13 |
# File 'lib/zoology/logging.rb', line 11 def level @level end |
Class Method Details
.disable! ⇒ Object
13 14 15 |
# File 'lib/zoology/logging.rb', line 13 def disable! @disable = true end |
.logger(name) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/zoology/logging.rb', line 17 def logger(name) sink = @disable ? StringIO.new : STDOUT logger = Logger.new(sink) logger.level = @level || Logger::INFO logger.progname = name logger end |