module Shrine::Plugins::Logging

  1. lib/shrine/plugins/logging.rb

Documentation lives in doc/plugins/logging.md on GitHub.

Methods

Public Class

  1. configure
  2. load_dependencies

Public Class methods

configure (uploader, opts = {})
[show source]
   # File lib/shrine/plugins/logging.rb
17 def self.configure(uploader, opts = {})
18   uploader.opts[:logging_stream] = opts.fetch(:stream, uploader.opts.fetch(:logging_stream, $stdout))
19   uploader.opts[:logging_logger] = opts.fetch(:logger, uploader.opts.fetch(:logging_logger, uploader.create_logger))
20   uploader.opts[:logging_format] = opts.fetch(:format, uploader.opts.fetch(:logging_format, :human))
21 
22   Shrine.deprecation("The :heroku logging format has been renamed to :logfmt. Using :heroku name will stop being supported in Shrine 3.") if uploader.opts[:logging_format] == :heroku
23 end
load_dependencies (uploader, *)
[show source]
   # File lib/shrine/plugins/logging.rb
13 def self.load_dependencies(uploader, *)
14   uploader.plugin :hooks
15 end