Re: Add appender programmatically

2010-05-11 Thread PriyaPrakash
is sample testing"); pls reply me , Thanks in Advance -- View this message in context: http://old.nabble.com/Add-appender-programmatically-tp28228274p28522882.html Sent from the Log4php - Users mailing list archive at Nabble.com.

Re: Add appender programmatically

2010-05-08 Thread miquel canes
properties > file. The filter is  supported in xml config file,here it's supported or > not. > -- > View this message in context: > http://old.nabble.com/Add-appender-programmatically-tp28228274p28494246.html > Sent from the Log4php - Users mailing list archive at Nabble.com. > >

Re: Add appender programmatically

2010-05-08 Thread PriyaPrakash
,DEBUG). why we cannot use the filter function for filter the level in properties file. The filter is supported in xml config file,here it's supported or not. -- View this message in context: http://old.nabble.com/Add-appender-programmatically-tp28228274p28494246.html Sent from the Log4p

Re: Add appender programmatically

2010-05-07 Thread Miquel Canes
On Friday 07 May 2010 12:13:14 PriyaPrakash wrote: > Hi, > > Thanks for ur quick reply , i use that code now it write the log level in > the log file, then i need how to filter the level for store the log level > in different log file name (i.e) > > For example ; > > To store the INFO level in

Re: Add appender programmatically

2010-05-07 Thread PriyaPrakash
store the DEBUG level in separate log file name.(it contain only the DEBUG level message) How can implement it,please help me. -- View this message in context: http://old.nabble.com/Add-appender-programmatically-tp28228274p28484316.html Sent from the Log4php - Users mailing list archive at

Re: Add appender programmatically

2010-05-07 Thread Miquel Canes
On Friday 07 May 2010 11:48:24 PriyaPrakash wrote: > Hi, > > I am currently working in the latest version of log4php2.0,use ur code, > its work perfectly to add appender programmatically but the log level > messages are not displayed in the log file,give ur ideas. Hi, If you

Re: Add appender programmatically

2010-05-07 Thread PriyaPrakash
Hi, I am currently working in the latest version of log4php2.0,use ur code, its work perfectly to add appender programmatically but the log level messages are not displayed in the log file,give ur ideas. -- View this message in context: http://old.nabble.com/Add-appender-programmatically

Re: Add appender programmatically

2010-04-15 Thread Christian Grobmeier
ah yes, I didn't see this. Maybe its worth thinking to autmatically activateoptions once this appender is called Thanks for giving feedback On Thu, Apr 15, 2010 at 1:32 PM, Miquel Canes wrote: > Hi, > Finally, after using the php debuger, i found what's my problem. > > $logger = Logger::ge

Re: Add appender programmatically

2010-04-15 Thread Miquel Canes
Hi, Finally, after using the php debuger, i found what's my problem. $logger = Logger::getRootLogger(); $appender = new LoggerAppenderFile("programmatically"); $layout = new LoggerLayoutPattern("[%p] %t %c - %m%n"); $appender->setLayout($layout); $appender->setFileName("programmatically.log"); $

Re: Add appender programmatically

2010-04-14 Thread Miquel Canes
Hi, If i call the configure() function after add the appender, none of them works. Well, all the loggers and appenders inside the property file are ignored. If i try put the logger line of the property file on the bottom, happens the same that if that line are on the top of the property file. A

Re: Add appender programmatically

2010-04-14 Thread Christian Grobmeier
Hm I think I know the problem. Its because you first need to configure the appenders and then the loggers. Otherwise the references are not set. This is also true for property files in general in log4php. First appenders, then loggers. In your case - I am not sure if there is a workaround for thi

Re: Add appender programmatically

2010-04-14 Thread Miquel Canes
Hello, It doesn't work. Logger::configure(dirname(__FILE__) . '/../log4php.properties'); $logger = Logger::getRootLogger(); $appender = new LoggerAppenderFile("programmatically"); $layout = new LoggerLayoutPattern("[%p] %t %c - %m%n"); $appender->setLayout($layout); $appender->setFileName("prog

Re: Add appender programmatically

2010-04-14 Thread Christian Grobmeier
Hello, whats returned if you do: echo $logger->isInfoEnabled(); My guess is that info level is not enabled for the root logger Also you might need to set a threshhold for your appender: $appender->setThreshold($threshhold); which is in fact a LoggerLevel. If you use ALL, you outputing all Pls

Add appender programmatically

2010-04-13 Thread Miquel Canes
Hello, I'm trying to add a file appender programmatically. I'm using this piece of code $logger = Logger::getRootLogger(); $appender = new LoggerAppenderFile("programmatically"); $layout = new LoggerLayoutPattern("[%p] %t %c - %m%n"); $appender->setLayout($layout); $appender->setFileName("prog