Module: Singly::Logger
- Included in:
- Http
- Defined in:
- lib/singly/logger.rb
Instance Method Summary collapse
Instance Method Details
#log(msg) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/singly/logger.rb', line 3 def log(msg) return unless Singly.verbose if defined?(Rails) Rails.logger.info("[singly] #{msg}") # Naive logging. # This lumberjack will log in Rails if defined. # Otherwise it just puts all logs to stdout else puts "[singly] #{msg}" end end |