webmcp

diff framework/env/trace/enter_config.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_config.lua	Sat Oct 16 17:49:11 2010 +0200
     1.2 +++ b/framework/env/trace/enter_config.lua	Sat Oct 16 17:51:18 2010 +0200
     1.3 @@ -8,9 +8,11 @@
     1.4  --]]--
     1.5  
     1.6  function trace.enter_config(args)
     1.7 -  local name = args.name
     1.8 -  if type(name) ~= "string" then
     1.9 -    error("No name string passed to trace.enter_config{...}.")
    1.10 +  if not trace._disabled then
    1.11 +    local name = args.name
    1.12 +    if type(name) ~= "string" then
    1.13 +      error("No name string passed to trace.enter_config{...}.")
    1.14 +    end
    1.15 +    trace._open_section{ type = "config", name = name }
    1.16    end
    1.17 -  trace._open_section{ type = "config", name = name }
    1.18  end

Impressum / About Us