Module: TentSteakFeatures::DebugView

Defined in:
lib/tent_steak/debug.rb

Overview

TentSteak view methods for :debug feature. The :debug feature activates implicit in-memory logging with TSLogger, unless a log file is explicitly set, e.g. in TentSteak.init_db.

Instance Method Summary collapse

Instance Method Details

#dump_mem_log(style = "logdump") ⇒ Object

Display entire contents of in-memory log in a <pre> element. By default assigns a CSS style of “logdump”, but you can override that by passing a new CSS style in as the style parameter.



36
37
38
39
40
# File 'lib/tent_steak/debug.rb', line 36

def dump_mem_log(style = "logdump")
  if content = TentSteak.logger.mem_log
    pre(content, :class => style)
  end
end