modperl_trace_level_set gets called from modperl_cmd.c only if you have
PerlTrace in httpd.conf. Of course this case ignores the env var, but
there is no other place in the code that calls this func to check for the
env setting of MOD_PERL_TRACE.

On the related note the following would be very useful when debugging
configuration sections and possibly from the code as well, if we provide a
hook to change the trace level from code as well:
  $s->trace_level('d');

Now what would be nice to have is to allow the negation of the level, so
in httpd.conf one can do:

  PerlTrace d
  PerlModule CGI
  PerlTrace !d

Here I want to have a 'd' trace only for a section between two PerlTrace
directives.

I think also that this can be improved as well: Currently

  PerlTrace d

followed by

  PerlTrace g

turns off 'd' and turns on 'g' instead of appending 'g'.

To summarize I suggest to have:

PerlTrace [!]all | [!]d[!]f[!]g[!]h[!]i[!]m[!]s | off

  all turn all on
  off turn all off
  d   directive processing
  f   filters
  g   Perl runtime interaction
  h   handlers
  i   interpreter pool management
  m   memory allocations
  s   perl sections

!, before the letter, turns off the setting for this level, so one can
have:

  PerlTrace dh       #level = dh
  PerlTrace !dg!h    #level = g

well if we have !, we can also do: !all (instead of adding 'off' level).

(but if we have off would be nice to replace all with on (or alias) but I
understand that it'll break the convention with normal Perl tracing)

and of course being able to turn levels on and off via $server.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to