You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by William McKee <wi...@knowmad.com> on 2004/01/21 19:48:39 UTC

Trace level defaults to 'debug'

The testing documentation at perl.apache.org says that the current trace
level defaults to info. However, my system is outputting debug messages
to the t/logs/error_log file. Is this the correct behavior in which case
the docs are wrong? Or have I somehow configured my system to default to
debug mode?

Thanks,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com

Re: Trace level defaults to 'debug'

Posted by William McKee <wi...@knowmad.com>.
On Wed, Jan 21, 2004 at 01:51:05PM -0800, Stas Bekman wrote:
> >>LogLevel    debug
> >
> >That's the one I needed to set.
> 
> You can override it later in your extra conf files. But it's a good idea to 
> keep it at the debug level.

I was able to override but will follow your advice. The info about where
to set it (extra.conf.in) and your suggestion to use LogLevel debug
should probably be added to the patch I submitted.


> >That makes sense now. I'm still getting the client and server stuff
> >mixed up :).
> 
> You don't. Apache::TestTrace works on the client and the server sides. It's 
> the tracing of Apache-Test, which is unrelated to logging of Apache.

As I've recently found out. Thanks for fixing up my documentation patch.


> It takes some time to learn to appreciate Apache::TestTrace.

Actually, I've recently started using Log::Log4perl and find
Apache::TestTrace to be a similar tool. Now that I know how to use it, I
will be able to put its power to work for me.


Thanks,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com

Re: Trace level defaults to 'debug'

Posted by Stas Bekman <st...@stason.org>.
William, please take a look at the current cvs, I've updated it with an 
extended section on tracing.

here is the document explaining how to get the latest cvs of the docs
http://perl.apache.org/download/docs.html

Please check that it's all clear now and send patches if something is still 
missing/wrong/etc. Thanks.



__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Trace level defaults to 'debug'

Posted by Stas Bekman <st...@stason.org>.
William McKee wrote:
> On Wed, Jan 21, 2004 at 12:35:07PM -0800, Stas Bekman wrote:
> 
>>William McKee wrote:
>>
>>>The testing documentation at perl.apache.org says that the current trace
>>>level defaults to info. However, my system is outputting debug messages
>>>to the t/logs/error_log file. Is this the correct behavior in which case
>>>the docs are wrong? Or have I somehow configured my system to default to
>>>debug mode?
>>
>>What are the 'debug' messages you are talking about?
> 
> 
> The [debug] messages in the t/logs/error_log. In particular the ones
> that look like the following:
> 
> [Wed Jan 21 15:58:25 2004] [debug] mod_cvs.c(217): CVSCheck is off here: /index.html

Thanks.

>>The Apache LogLevel is set to 'debug':
>>
>>% grep Level t/conf/httpd.conf
>>LogLevel    debug
> 
> 
> That's the one I needed to set.

You can override it later in your extra conf files. But it's a good idea to 
keep it at the debug level.

>>The Apache-Test tracing mechanism is set to 'info'. so:
>>
>>use Apache::TestTrace;
>>info "doing foo";  # will be logged
>>debug "doing bar"; # won't be logged
> 
> 
> That makes sense now. I'm still getting the client and server stuff
> mixed up :).

You don't. Apache::TestTrace works on the client and the server sides. It's 
the tracing of Apache-Test, which is unrelated to logging of Apache.

> --- testing.pod.orig	2004-01-21 16:21:48.000000000 -0500
> +++ testing.pod.wlm	2004-01-21 16:31:09.000000000 -0500
> @@ -310,6 +310,10 @@
>  
>    % t/TEST -trace=warning ...
>  
> +These messages are printed to STDOUT during testing. See Apache::TestTrace for
> +more information. To control the messages printed to the server error_log, set
> +the Apache directive LogLevel. See the Apache documentation at httpd.apache.org
> +for more details.

Thanks, William, but it prints the messages to STDERR. This is documented in 
the Apache::TestTrace manpage. I'll commit an adjusted version of your patch.

It takes some time to learn to appreciate Apache::TestTrace. It allows you to 
keep your debug messages in the code without commenting them out and they 
won't print anything till you run the test suite with:

   t/TEST -trace=debug

or use the env variable. It also does a lot of magic for you, like dumping 
perl structures via Data::Dumper. I also use the 'error' tracing function 
quite a lot when I have a lot of debug output and I want some of it to stand 
out. error() prints it in bold red.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Trace level defaults to 'debug'

Posted by William McKee <wi...@knowmad.com>.
On Wed, Jan 21, 2004 at 04:31:50PM -0500, William McKee wrote:
> > Please suggest a clarification to the docs now that you know all the 
> > answers to this issue, William ;)
> 
> Attached :).

Please ignore the previous diff. I've revised the changes to include how
to output messages.

William

-- 
Knowmad Services Inc.
http://www.knowmad.com

Re: Trace level defaults to 'debug'

Posted by William McKee <wi...@knowmad.com>.
On Wed, Jan 21, 2004 at 12:35:07PM -0800, Stas Bekman wrote:
> William McKee wrote:
> >The testing documentation at perl.apache.org says that the current trace
> >level defaults to info. However, my system is outputting debug messages
> >to the t/logs/error_log file. Is this the correct behavior in which case
> >the docs are wrong? Or have I somehow configured my system to default to
> >debug mode?
> 
> What are the 'debug' messages you are talking about?

The [debug] messages in the t/logs/error_log. In particular the ones
that look like the following:

[Wed Jan 21 15:58:25 2004] [debug] mod_cvs.c(217): CVSCheck is off here: /index.html


> The Apache LogLevel is set to 'debug':
> 
> % grep Level t/conf/httpd.conf
> LogLevel    debug

That's the one I needed to set.


> The Apache-Test tracing mechanism is set to 'info'. so:
> 
> use Apache::TestTrace;
> info "doing foo";  # will be logged
> debug "doing bar"; # won't be logged

That makes sense now. I'm still getting the client and server stuff
mixed up :).


> Refer to the Apache::TestTrace manpage for more information.

Thanks.


> Please suggest a clarification to the docs now that you know all the 
> answers to this issue, William ;)

Attached :).


Thanks,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com

Re: Trace level defaults to 'debug'

Posted by Stas Bekman <st...@stason.org>.
William McKee wrote:
> The testing documentation at perl.apache.org says that the current trace
> level defaults to info. However, my system is outputting debug messages
> to the t/logs/error_log file. Is this the correct behavior in which case
> the docs are wrong? Or have I somehow configured my system to default to
> debug mode?

What are the 'debug' messages you are talking about?

The Apache LogLevel is set to 'debug':

% grep Level t/conf/httpd.conf
LogLevel    debug

The Apache-Test tracing mechanism is set to 'info'. so:

use Apache::TestTrace;
info "doing foo";  # will be logged
debug "doing bar"; # won't be logged

Refer to the Apache::TestTrace manpage for more information.

Please suggest a clarification to the docs now that you know all the answers 
to this issue, William ;)


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com