Module: DartTrails::Logging
- Included in:
- Tilt::Engine
- Defined in:
- lib/dart_trails/logging.rb
Instance Method Summary collapse
Instance Method Details
#log(level, s) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/dart_trails/logging.rb', line 8 def log(level, s) = (level, s) if defined?(Logger) logger.send(level, ) else STDERR.puts end end |
#logger ⇒ Object
4 5 6 |
# File 'lib/dart_trails/logging.rb', line 4 def logger @logger ||= Logger.new(STDOUT) if defined?(Logger) end |