You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Swen Schillig <SC...@de.ibm.com> on 2003/05/13 11:27:53 UTC
Re: Beginners question (contn'ed)
Hmm, I guess I found something.
Is it possible that the file/line information is only printed on LOG_DEBUG
level ??
Even though it would make sense, but I wouldn't like it too much !
Stas
First of all I've to say, all test finished successfully,
I wouldn't have bothered you or anybody else otherwise.
But to my shame, yes, I'm getting all the right loggings if I
run the mentioned test !!!
Now I'm a bit confused, if I use the test code in my environment
it's again not working correctly.
I assumed that it must be something wrong/different in the
directory-configuration
but even yours (which is just plain) didn't show the results from the test.
I hope that triggers something with you !
Thanks again
Swen
Swen Schillig wrote:
> Stas, thanks for you reply and sorry for not follwoing the rules.
> Below is the information as expected.
>
> 1. Problem Description:
>
> Sorry, I should have turned on the use warn pragma earlier.
> At least I would have found the reason for the wrong log-codes.
> But I thought I could use the examples of the brilliant docs out of
the box :-)
Please submit documentation patches, to improve it. Thanks.
> I found my problem not having the right log-code.
> It was that I only had Apache::Const -compile ':common' in my
startup.pl
> while those codes are only included with the ':log' tag.
> But I'm still getting no information about the file-name and the
line-number.
> Even though this information is returned correctly by
Apache::LOG_MARK.
You didn't reply to my question:
what happens when you run the test that exercises this functionality:
cd modperl-2.0
t/TEST -v api/aplog
do you get the right logging (including the file/line info)? (see
t/logs/error_log)
__________________________________________________________________
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: Beginners question (contn'ed)
Posted by Stas Bekman <st...@stason.org>.
Swen Schillig wrote:
> Hmm, I guess I found something.
> Is it possible that the file/line information is only printed on LOG_DEBUG
> level ??
Bingo.
> Even though it would make sense, but I wouldn't like it too much !
Because that's how Apache logging is defined:
in httpd-2.0/server/log.c:476
if (file && level_and_mask == APLOG_DEBUG) {
[...]
len += apr_snprintf(errstr + len, MAX_STRING_LEN - len,
"%s(%d): ", file, line);
}
mod_perl API is providing an indentical interface to Apache API in most cases.
So if you switch between C and Perl API you don't get surprised when the
behavior changes.
Perhaps you should convince the Apache developers to change this behavior, and
then we will sync.
Meanwhile I'll update the Apache::Log manpage to document this issue.
__________________________________________________________________
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