multiple loggers doesn't work

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

multiple loggers doesn't work

Alper Kanat
Hi,

I have the attached logger.inc.php configuration file added in our project. Then in the code, I get a logger with the following code:

$log = Logger::getLogger('warehouse');

However all log lines are written into root logger's appender and the appender file for 'warehouse' logger remains empty.

What am I missing?

---
Quis custodiet ipsos custodes?

logger.inc.php (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: multiple loggers doesn't work

Vladimír Gorej
It is hard to say, because ButigoLoggerAppenderRollingFile is not standard log4php appender. Custom php code that this appender contains may prevent it from properly logging. 


On Thu, Nov 14, 2013 at 2:13 PM, Alper Kanat <[hidden email]> wrote:
Hi,

I have the attached logger.inc.php configuration file added in our project. Then in the code, I get a logger with the following code:

$log = Logger::getLogger('warehouse');

However all log lines are written into root logger's appender and the appender file for 'warehouse' logger remains empty.

What am I missing?

---
Quis custodiet ipsos custodes?



--
Vladimír Gorej | CodeScale s.r.o.
email: [hidden email]
tel: +420 777 861 279, +421 948 023 011
web: http://www.codescale.net
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: multiple loggers doesn't work

Alper Kanat
No it's irrevelant. I just change where it stores the logs by default. I changed all appenders to LoggerAppenderRollingFile just incase and it saved into butigo.log in project root with following commands I issued in php-cli:

$log = Logger::getLogger('warehouse');
$log->info('test1');


---
Quis custodiet ipsos custodes?


On Thu, Nov 14, 2013 at 4:57 PM, Vladimír Gorej <[hidden email]> wrote:
It is hard to say, because ButigoLoggerAppenderRollingFile is not standard log4php appender. Custom php code that this appender contains may prevent it from properly logging. 


On Thu, Nov 14, 2013 at 2:13 PM, Alper Kanat <[hidden email]> wrote:
Hi,

I have the attached logger.inc.php configuration file added in our project. Then in the code, I get a logger with the following code:

$log = Logger::getLogger('warehouse');

However all log lines are written into root logger's appender and the appender file for 'warehouse' logger remains empty.

What am I missing?

---
Quis custodiet ipsos custodes?



--
Vladimír Gorej | CodeScale s.r.o.
email: [hidden email]
tel: <a href="tel:%2B420%20777%20861%20279" value="+420777861279" target="_blank">+420 777 861 279, <a href="tel:%2B421%20948%20023%20011" value="+421948023011" target="_blank">+421 948 023 011
web: http://www.codescale.net

Loading...