webmcp

diff framework/env/trace/enter_filter.lua @ 41:0bbfee4d4aed

New functions trace.disable() and trace.is_disabled()
author jbe
date Sat Oct 16 17:51:18 2010 +0200 (2010-10-16)
parents 9fdfb27f8e67
children
line diff
     1.1 --- a/framework/env/trace/enter_filter.lua	Sat Oct 16 17:49:11 2010 +0200
     1.2 +++ b/framework/env/trace/enter_filter.lua	Sat Oct 16 17:51:18 2010 +0200
     1.3 @@ -8,9 +8,11 @@
     1.4  --]]--
     1.5  
     1.6  function trace.enter_filter(args)
     1.7 -  local path = args.path
     1.8 -  if type(path) ~= "string" then
     1.9 -    error("No path string passed to trace.enter_filter{...}.")
    1.10 +  if not trace._disabled then
    1.11 +    local path = args.path
    1.12 +    if type(path) ~= "string" then
    1.13 +      error("No path string passed to trace.enter_filter{...}.")
    1.14 +    end
    1.15 +    trace._open_section{ type = "filter", path = path }
    1.16    end
    1.17 -  trace._open_section{ type = "filter", path = path }
    1.18  end

Impressum / About Us