[email protected]
[Top] [All Lists]

Re: LoggerAppenderMailEvent does not work

Subject: Re: LoggerAppenderMailEvent does not work
From: Christian Grobmeier
Date: Wed, 3 Mar 2010 13:56:41 +0100
Outch.... looks like a bug. Could you please open a ticket for this at:
and add your description below?
I will take it from there.

Thanks much!

On Wed, Mar 3, 2010 at 1:49 PM, Florian Platzer <[email protected]> wrote:
I've configured an email appender like this:

return array(
           Â'rootLogger' => array(
               Â'level' => 'DEBUG',
               Â'appenders' => array('email'),
           Â),
           Â'loggers' => array(
               Â'ldap' => array(
                   Â'level' => 'DEBUG',
                   Â'appenders' => array('email'),
               Â),
           Â),
           Â'appenders' => array(
               Â'email' => array(
                   Â'class' =>
'LoggerAppenderMailEvent',
                   Â'layout' => array(
                       Â'class' =>
'LoggerLayoutPattern',
                       Â'conversionPattern' =>
"%d{Y-m-d H:i:s} %-5p %c %X{username}: %m in %F at %L%n",
                   Â),
                   Â'from' => '[email protected]',
                   Â'to' => '[email protected]',
                   Â'subject' => 'Error',
                   Â'smtpHost' => '0.0.0.0',
               Â),
           Â),
       Â);

But when I try to log, i get the following error:

PHP Warning: Âmail() [<a href=""> &quot;sendmail_from&quot; not set in php.ini or custom &quot;From:&quot;
header missing in ..\log4php\appenders\LoggerAppenderMailEvent.php on line
166
PHP Fatal error: ÂUncaught exception 'LoggerException' with message 'Error
sending mail to ''!' in
..\log4php\appenders\LoggerAppenderMailEvent.php:169
Stack trace:
#0 ..\log4php\LoggerAppender.php(134):
LoggerAppenderMailEvent->append(Object(LoggerLoggingEvent))
#1 ..\log4php\Logger.php(410):
LoggerAppender->doAppend(Object(LoggerLoggingEvent))
#2 ..\log4php\Logger.php(273):
Logger->callAppenders(Object(LoggerLoggingEvent))
#3 ..\log4php\Logger.php(331): Logger->forcedLog('Logger', NULL,
Object(LoggerLevel), 'Testlog')
#4 ..\log4php\Logger.php(216): Logger->logLevel('Testlog',
Object(LoggerLevel), NULL)
#5 ..\Ldap.class.php(9): Logger->debug('Testlog')
...
Âthrown in ..\log4php\appenders\LoggerAppenderMailEvent.php on line 169


Florian

<Prev in Thread] Current Thread [Next in Thread>