Sha256: b9c16927bafbbe925ddbaccbd7abad814e9acdb584fa48ae3cd5b2e6585a2222

Contents?: true

Size: 705 Bytes

Versions: 6

Compression:

Stored size: 705 Bytes

Contents

require 'celluloid/logger'

module Listen
  module Internals
    module Logging
      def _info(*args, &block)
        _log(:info, *args, &block)
      end

      def _warn(*args, &block)
        _log(:warn, *args, &block)
      end

      def _debug(*args, &block)
        _log(:debug, *args, &block)
      end

      def _log(*args, &block)
        if block
          Celluloid::Logger.send(*args, block.call)
        else
          Celluloid::Logger.send(*args)
        end
      end

      def _format_error(fmt)
        format(fmt, $ERROR_INFO, ", Backtrace: \n" + $ERROR_POSITION * "\n")
      end

      def _error_exception(fmt)
        _log :error, _format_error(fmt)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
listen-2.10.1 lib/listen/internals/logging.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/listen-2.8.6/lib/listen/internals/logging.rb
listen-2.10.0 lib/listen/internals/logging.rb
listen-2.9.0 lib/listen/internals/logging.rb
listen-2.8.6 lib/listen/internals/logging.rb
listen-2.8.5 lib/listen/internals/logging.rb