lib/openwfe/logging.rb in openwferu-0.9.6 vs lib/openwfe/logging.rb in openwferu-0.9.7
- old
+ new
@@ -38,11 +38,12 @@
#
# John Mettraux at openwfe.org
#
require 'logger'
-require 'openwfe/rudefinitions'
+require 'openwfe/utils'
+#require 'openwfe/rudefinitions'
module OpenWFE
#
@@ -70,9 +71,16 @@
do_log(:fatal, message, &block)
end
def lunknown (message=nil, &block)
do_log(:unknown, message, &block)
+ end
+
+ #
+ # A simplification of caller_to_s for direct usage when debugging
+ #
+ def ldebug_callstack (msg, max_lines=nil)
+ ldebug { "#{msg}\n" + OpenWFE::caller_to_s(9, max_lines) }
end
private
def do_log (level, message, &block)