Module: Paperclip::Logger

Included in:
Paperclip
Defined in:
lib/paperclip/logger.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) log(message)

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 message
  logger.info("[paperclip] #{message}") if logging?
end

- (Object) logger

:nodoc:



9
10
11
# File 'lib/paperclip/logger.rb', line 9

def logger #:nodoc:
  @logger ||= options[:logger] || ::Logger.new(STDOUT)
end

- (Object) logger=(logger)



13
14
15
# File 'lib/paperclip/logger.rb', line 13

def logger=(logger)
  @logger = logger
end

- (Boolean) logging?

:nodoc:

Returns:

  • (Boolean)


17
18
19
# File 'lib/paperclip/logger.rb', line 17

def logging? #:nodoc:
  options[:log]
end