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 phpalerts <ph...@gmail.com> on 2010/12/29 07:06:43 UTC

Dynamically add "log4php.appender.default.file" in "appender_dailyfile.properties"


Hello,

I am using log4php's "appender_dailyfile.properties" for logging purpose.
I want to add the "log4php.appender.default.file" property dynamically
through PHP
How can i do it?

-- 
View this message in context: http://old.nabble.com/Dynamically-add-%22log4php.appender.default.file%22-in-%22appender_dailyfile.properties%22-tp30549427p30549427.html
Sent from the Log4php - Dev mailing list archive at Nabble.com.


Re: Dynamically add "log4php.appender.default.file" in "appender_dailyfile.properties"

Posted by Christian Grobmeier <gr...@gmail.com>.
Hello,

did you try to get the Appender:
$a = Logger::getAppender($name)

 and call setFile(string $fileName) on it?

$a-> setFile(string $fileName)

Cheers
Christian

On Wed, Dec 29, 2010 at 7:06 AM, phpalerts <ph...@gmail.com> wrote:
>
>
> Hello,
>
> I am using log4php's "appender_dailyfile.properties" for logging purpose.
> I want to add the "log4php.appender.default.file" property dynamically
> through PHP
> How can i do it?
>
> --
> View this message in context: http://old.nabble.com/Dynamically-add-%22log4php.appender.default.file%22-in-%22appender_dailyfile.properties%22-tp30549427p30549427.html
> Sent from the Log4php - Dev mailing list archive at Nabble.com.
>
>



-- 
http://www.grobmeier.de