Module: Paperclip::Logger
- Included in:
- Paperclip
- Defined in:
- lib/paperclip/logger.rb
Instance Method Summary collapse
-
#log(message) ⇒ Object
Log a paperclip-specific line.
-
#logger ⇒ Object
:nodoc:.
- #logger=(logger) ⇒ Object
-
#logging? ⇒ Boolean
:nodoc:.
Instance Method Details
#log(message) ⇒ Object
Log a paperclip-specific line. This will log to STDOUT by default. Set Paperclip.options to false to turn off.
5 6 7 |
# File 'lib/paperclip/logger.rb', line 5 def log logger.info("[paperclip] #{}") if logging? end |
#logger ⇒ Object
:nodoc:
9 10 11 |
# File 'lib/paperclip/logger.rb', line 9 def logger #:nodoc: @logger ||= [:logger] || ::Logger.new(STDOUT) end |
#logger=(logger) ⇒ Object
13 14 15 |
# File 'lib/paperclip/logger.rb', line 13 def logger=(logger) @logger = logger end |
#logging? ⇒ Boolean
:nodoc:
17 18 19 |
# File 'lib/paperclip/logger.rb', line 17 def logging? #:nodoc: [:log] end |