method

new

Importance_0
v3.2.1 - Show latest stable - 0 notes - Class: ActiveSupport::BufferedLogger
new(log, level = DEBUG) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/buffered_logger.rb, line 47
    def initialize(log, level = DEBUG)
      @level         = level
      @log_dest      = log

      unless log.respond_to?(:write)
        unless File.exist?(File.dirname(log))
          ActiveSupport::Deprecation.warn(Automatic directory creation for '#{log}' is deprecated.  Please make sure the directory for your log file exists before creating the logger.)
          FileUtils.mkdir_p(File.dirname(log))
        end
      end

      @log = open_logfile log
    end
Register or log in to add new notes.