私自身のペーパークリッププロセッサを作成しようとしていますが、ペーパークリップロガーにどのようにログする必要がありますか?ペーパークリッププロセッサ - 私自身のプロセッサでpaperclip loggerを使用するには?
私は以下を試しましたが、log 'here is the processor'
は何も出していません。私はどうしたらいいですか?
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
ペーパークリップのログになっているのですか? – flooooo
はい、ペーパークリップのログが有効です。私は自分のログに他のデフォルトのクリップを見ることができました。 – larryzhao
カスタムプロセッサが呼び出されていますか?それは現在、上記の投稿スニペットですか、それとも単に重要な行を抽出しましたか? – flooooo