Reputation: 3213
I am trying to write my own paperclip processor, but how should I log to the paperclip logger?
I tried the following, log 'here is the processor'
doesn't put out anything. How should I do that?
module Paperclip
class MyProcessor < Processor
include Paperclip::Logger
def initialize(file, options = {}, attachment = nil)
super
@format = options[:format]
@current_format = File.extname(@file.path)
@basename = File.basename(@file.path, @current_format)
end
def make
log 'here is the processor'
end
end
end
Upvotes: 2
Views: 650
Reputation: 1474
If, in your processor you need to log, the log method is part of the Paperclip module
Paperclip.log "Log something"
https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/logger.rb
Upvotes: 2
Reputation: 709
Maybe you need to call it this way:
def make
logger.log 'here is the processor'
end
No possibility to test it here - so cannot promise you anything. :)
Upvotes: 1