Sha256: ac39bf4406a9e2aec0907f9e6b54bc01d7d76fb381195712eb01ba1aa7f42b8d

Contents?: true

Size: 531 Bytes

Versions: 10

Compression:

Stored size: 531 Bytes

Contents

module Bowline
  # To be included in classes to allow some basic logging.
  module Logging
    def trace(msg=nil)
      Bowline.logger.info(msg)
    end
    module_function :trace
    public :trace
    
    def debug(msg=nil)
      Bowline.logger.debug(msg)
    end
    module_function :debug
    public :debug
    
    # Log an error backtrace if debugging is activated
    def log_error(e=$!)
      Bowline.logger.error "#{e}\n\t" + e.backtrace.join("\n\t")
    end
    module_function :log_error
    public :log_error
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bowline-0.9.4 lib/bowline/logging.rb
bowline-0.9.3 lib/bowline/logging.rb
bowline-0.9.2 lib/bowline/logging.rb
bowline-0.9.1 lib/bowline/logging.rb
bowline-0.6.3 lib/bowline/logging.rb
bowline-0.6.2 lib/bowline/logging.rb
bowline-0.6.1 lib/bowline/logging.rb
bowline-0.6.0 lib/bowline/logging.rb
bowline-0.5.8 lib/bowline/logging.rb
bowline-0.5.7 lib/bowline/logging.rb