Sha256: 316d959908914464be205ee6b5bf94a749628067ecf86f4ba8a630b8dde6bc78

Contents?: true

Size: 438 Bytes

Versions: 52

Compression:

Stored size: 438 Bytes

Contents

module Berkshelf
  class Logger < Ridley::Logging::Logger
    alias_method :fatal, :error

    def deprecate(message)
      trace = caller.join("\n\t")
      warn "DEPRECATION WARNING: #{message}\n\t#{trace}"
    end

    # Log an exception and its backtrace to FATAL
    #
    # @param [Exception] ex
    def exception(ex)
      fatal("#{ex.class}: #{ex}")
      fatal(ex.backtrace.join("\n")) unless ex.backtrace.nil?
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
berkshelf-6.3.4 lib/berkshelf/logger.rb
berkshelf-6.3.3 lib/berkshelf/logger.rb
berkshelf-6.3.2 lib/berkshelf/logger.rb
berkshelf-6.3.1 lib/berkshelf/logger.rb
berkshelf-6.3.0 lib/berkshelf/logger.rb
berkshelf-6.2.2 lib/berkshelf/logger.rb
berkshelf-6.2.1 lib/berkshelf/logger.rb
berkshelf-6.2.0 lib/berkshelf/logger.rb
berkshelf-6.1.1 lib/berkshelf/logger.rb
berkshelf-6.1.0 lib/berkshelf/logger.rb
berkshelf-6.0.1 lib/berkshelf/logger.rb
berkshelf-6.0.0 lib/berkshelf/logger.rb
berkshelf-5.6.5 lib/berkshelf/logger.rb
berkshelf-5.6.4 lib/berkshelf/logger.rb
berkshelf-5.6.3 lib/berkshelf/logger.rb
berkshelf-5.6.2 lib/berkshelf/logger.rb
berkshelf-5.6.1 lib/berkshelf/logger.rb
berkshelf-5.6.0 lib/berkshelf/logger.rb
berkshelf-5.5.0 lib/berkshelf/logger.rb
berkshelf-5.4.0 lib/berkshelf/logger.rb