Sha256: 2c95c1aaed771e7d074917651bf77ea78850df402b8184101ff6b7683dcc242d

Contents?: true

Size: 406 Bytes

Versions: 9

Compression:

Stored size: 406 Bytes

Contents

module Berkshelf
  module Mixin
    # @author Jamie Winsor <reset@riotgames.com>
    module Logging
      def log
        Berkshelf::Logger
      end

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
berkshelf-1.4.6 lib/berkshelf/mixin/logging.rb
berkshelf-1.4.5 lib/berkshelf/mixin/logging.rb
berkshelf-2.0.0.beta lib/berkshelf/mixin/logging.rb
berkshelf-1.4.4 lib/berkshelf/mixin/logging.rb
berkshelf-1.4.3 lib/berkshelf/mixin/logging.rb
berkshelf-1.4.2 lib/berkshelf/mixin/logging.rb
berkshelf-1.4.1 lib/berkshelf/mixin/logging.rb
berkshelf-1.4.0 lib/berkshelf/mixin/logging.rb
berkshelf-1.4.0.rc1 lib/berkshelf/mixin/logging.rb