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 Hammers (JIRA)" <ji...@apache.org> on 2010/08/24 13:10:18 UTC
[jira] Commented: (LOG4PHP-124) Cannot access private property
LoggerLoggingEvent::$fqcn
[ https://issues.apache.org/jira/browse/LOG4PHP-124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901819#action_12901819 ]
Christian Hammers commented on LOG4PHP-124:
-------------------------------------------
Proposed fix:
$ diff -u src/main/php/LoggerLoggingEvent.php /usr/share/php/log4php/LoggerLoggingEvent.php
--- src/main/php/LoggerLoggingEvent.php 2009-11-27 07:44:14.000000000 +0100
+++ /usr/share/php/log4php/LoggerLoggingEvent.php 2010-08-24 13:06:10.000000000 +0200
@@ -197,6 +197,15 @@
}
/**
+ * Return the fully qualified class name of this event.
+ * Use this form instead of directly accessing the {@link $fqcn} field.
+ * @return string
+ */
+ public function getFqcn() {
+ return $this->fqcn;
+ }
+
+ /**
* Return the level of this event. Use this form instead of directly
* accessing the {@link $level} field.
* @return LoggerLevel
$ diff -u src/main/php/helpers/LoggerClassNamePatternConverter.php /usr/share/php/log4php/helpers/LoggerClassNamePatternConverter.php
--- src/main/php/helpers/LoggerClassNamePatternConverter.php 2009-11-27 07:44:13.000000000 +0100
+++ /usr/share/php/log4php/helpers/LoggerClassNamePatternConverter.php 2010-08-24 13:06:37.000000000 +0200
@@ -39,7 +39,7 @@
* @return string
*/
public function getFullyQualifiedName($event) {
- return $event->fqcn;
+ return $event->getFqcn();
}
}
> Cannot access private property LoggerLoggingEvent::$fqcn
> ---------------------------------------------------------
>
> Key: LOG4PHP-124
> URL: https://issues.apache.org/jira/browse/LOG4PHP-124
> Project: Log4php
> Issue Type: Bug
> Components: Code
> Affects Versions: 2.0
> Environment: Debian 5.0 Linux
> Reporter: Christian Hammers
>
> Hello
> I've encountered the following bug:
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP Fatal error: Cannot access private property LoggerLoggingEvent::$fqcn in /usr/share/php/log4php/helpers/LoggerClassNamePatternConverter.php on line 42
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP Stack trace:
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 1. {main}() /srv/ewu/devel/comcenter/src/htdocs/soap/index.php:0
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 2. require_once() /srv/ewu/devel/comcenter/src/htdocs/soap/index.php:5
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 3. Comcenter_Config::init() /srv/ewu/devel/comcenter/src/lib/Comcenter/Comcenter_Config.php:3
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 4. Logger->debug() /srv/ewu/devel/comcenter/src/lib/Comcenter/Comcenter_Config.php:60
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 5. Logger->logLevel() /usr/share/php/log4php/Logger.php:216
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 6. Logger->forcedLog() /usr/share/php/log4php/Logger.php:331
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 7. Logger->callAppenders() /usr/share/php/log4php/Logger.php:273
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 8. LoggerAppender->doAppend() /usr/share/php/log4php/Logger.php:410
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 9. LoggerAppenderFile->append() /usr/share/php/log4php/LoggerAppender.php:134
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 10. LoggerLayoutPattern->format() /usr/share/php/log4php/appenders/LoggerAppenderFile.php:111
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 11. LoggerPatternConverter->format() /usr/share/php/log4php/layouts/LoggerLayoutPattern.php:189
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 12. LoggerNamedPatternConverter->convert() /usr/share/php/log4php/helpers/LoggerPatternConverter.php:90
> [Tue Aug 24 12:59:45 2010] [error] [client 127.0.0.1] PHP 13. LoggerClassNamePatternConverter->getFullyQualifiedName() /usr/share/php/log4php/helpers/LoggerNamedPatternConverter.php:59
> # cat log4php.properties
> log4php.appender.comcenter_log = LoggerAppenderDailyFile
> log4php.appender.comcenter_log.datePattern = Y-m-d
> log4php.appender.comcenter_log.file = /srv/ewu/devel/comcenter/log/comcenter_%s.log
> log4php.appender.comcenter_log.layout = LoggerLayoutPattern
> log4php.appender.comcenter_log.layout.ConversionPattern = "%d{ISO8601} [%p] %C{1}#%L: %m%n"
> log4php.rootLogger = DEBUG, comcenter_log
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.