You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by "Patrick H. Piper" <pp...@netlinxinc.com> on 2006/01/24 13:24:55 UTC

getLocationInformation doesn't fetch filename and linenum

The getLocationInformation function does not seem to return:

Filename and file line number when using a custom LoggerPatternLayout under
PHP 5.1.2. 

My platform is:
Wintel (XP)
Apache 2
PHP 5.1.2
And latest SVN snapshot of log4php taken 1/21/2006

I was under the impression that the following svn commit would fix this: 

r349201 - /logging/log4php/trunk/src/log4php/spi/LoggerLoggingEvent.php

My log4php.properties file is as follows:
log4php.appender.default = LoggerAppenderDailyFile
log4php.appender.default.file = mylog.log
log4php.appender.default.layout = LoggerPatternLayout
log4php.appender.default.layout.conversionPattern = "%d{Y-m-d H:i:s} %p %c:
%m in %F at %L%n"

I get "NA" for %F and %L and have experimented with %F, %l, %L, and %M. 



Re: getLocationInformation doesn't fetch filename and linenum

Posted by "Marco V." <ma...@apache.org>.
I've just committed a patch that should address the problem.

As always, comments are welcome.

-Marco

----- Original Message ----- 
From: "Knut Urdalen" <kn...@telio.no>
To: "Log4PHP Dev" <lo...@logging.apache.org>
Sent: Tuesday, January 24, 2006 1:30 PM
Subject: Re: getLocationInformation doesn't fetch filename and linenum


> Patrick H. Piper wrote:
> 
> >I was under the impression that the following svn commit would fix this: 
> >
> >r349201 - /logging/log4php/trunk/src/log4php/spi/LoggerLoggingEvent.php
> >  
> >
> That bugfix should do it for PHP 5.0.x at least, maybe something changed 
> again in debug_backtrace() as of 5.1.2.
> 
> Marco: Do you have more insight in this?
> 
> Knut
> 

Re: getLocationInformation doesn't fetch filename and linenum

Posted by Knut Urdalen <kn...@telio.no>.
Patrick H. Piper wrote:

>I was under the impression that the following svn commit would fix this: 
>
>r349201 - /logging/log4php/trunk/src/log4php/spi/LoggerLoggingEvent.php
>  
>
That bugfix should do it for PHP 5.0.x at least, maybe something changed 
again in debug_backtrace() as of 5.1.2.

Marco: Do you have more insight in this?

Knut