Module: Bowline::Logging

Included in:
Desktop, Desktop::Bridge::Message, Desktop::JS::Script
Defined in:
lib/bowline/logging.rb

Overview

To be included in classes to allow some basic logging.

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) debug(msg = nil)



10
11
12
# File 'lib/bowline/logging.rb', line 10

def debug(msg=nil)
  Bowline.logger.debug(msg)
end

+ (Object) log_error(e = $!)

Log an error backtrace if debugging is activated



17
18
19
# File 'lib/bowline/logging.rb', line 17

def log_error(e=$!)
  Bowline.logger.error "#{e}\n\t" + e.backtrace.join("\n\t")
end

+ (Object) trace(msg = nil)



4
5
6
# File 'lib/bowline/logging.rb', line 4

def trace(msg=nil)
  Bowline.logger.info(msg)
end

Instance Method Details

- (Object) debug(msg = nil)



10
11
12
# File 'lib/bowline/logging.rb', line 10

def debug(msg=nil)
  Bowline.logger.debug(msg)
end

- (Object) log_error(e = $!)

Log an error backtrace if debugging is activated



17
18
19
# File 'lib/bowline/logging.rb', line 17

def log_error(e=$!)
  Bowline.logger.error "#{e}\n\t" + e.backtrace.join("\n\t")
end

- (Object) trace(msg = nil)



4
5
6
# File 'lib/bowline/logging.rb', line 4

def trace(msg=nil)
  Bowline.logger.info(msg)
end