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 "Christian Grobmeier (JIRA)" <ji...@apache.org> on 2010/04/22 07:10:52 UTC
[jira] Commented: (LOG4PHP-97) LoggerAppenderMailEvent does not
work
[ https://issues.apache.org/jira/browse/LOG4PHP-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859657#action_12859657 ]
Christian Grobmeier commented on LOG4PHP-97:
--------------------------------------------
Could you echo the LoggerAppenderMailEvent on line 162 with:
echo $addHeader;
I am curious what we find
> LoggerAppenderMailEvent does not work
> -------------------------------------
>
> Key: LOG4PHP-97
> URL: https://issues.apache.org/jira/browse/LOG4PHP-97
> Project: Log4php
> Issue Type: Bug
> Components: Code
> Affects Versions: 2.0
> Environment: Windows Server 2008
> IIS 7
> PHP 5.2
> Reporter: Florian Platzer
> Original Estimate: 0.08h
> Remaining Estimate: 0.08h
>
> 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' => 'mail@kfv.at',
> 'to' => 'mail@kfv.at',
> 'subject' => 'Error',
> 'smtpHost' => '0.0.0.0',
> ),
> ),
> );
> But when I try to log, i get the following error:
> PHP Warning: mail() [<a href='function.mail'>function.mail</a>]:
> "sendmail_from" not set in php.ini or custom "From:"
> 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.