To be included in classes to allow some basic logging that can be silenced (Logging.silent=) or made more verbose. Logging.debug=: log all error backtrace and messages
logged with +debug+.
Logging.trace=: log all raw request and response and
messages logged with +trace+.
Log a message to the console if debugging is activated
# File lib/thin/logging.rb, line 41 41: def debug(msg=nil) 42: log msg || yield if Logging.debug? 43: end
# File lib/thin/logging.rb, line 14 14: def debug?; !@silent && @debug end
Log a message to the console
# File lib/thin/logging.rb, line 27 27: def log(msg) 28: puts msg unless Logging.silent? 29: end
Log an error backtrace if debugging is activated
# File lib/thin/logging.rb, line 48 48: def log_error(e=$!) 49: debug "#{e}\n\t" + e.backtrace.join("\n\t") 50: end
Log a message to the console if debugging is activated
# File lib/thin/logging.rb, line 41 41: def debug(msg=nil) 42: log msg || yield if Logging.debug? 43: end
Log a message to the console
# File lib/thin/logging.rb, line 27 27: def log(msg) 28: puts msg unless Logging.silent? 29: end
Log an error backtrace if debugging is activated
# File lib/thin/logging.rb, line 48 48: def log_error(e=$!) 49: debug "#{e}\n\t" + e.backtrace.join("\n\t") 50: end
Global silencer methods
# File lib/thin/logging.rb, line 19 19: def silent 20: Logging.silent? 21: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.