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 2009/10/11 01:50:31 UTC
[jira] Closed: (LOG4PHP-85) Unittest fail due to changed default of
xmlLayout->setLocationInfo
[ https://issues.apache.org/jira/browse/LOG4PHP-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Hammers closed LOG4PHP-85.
------------------------------------
Resolution: Fixed
Assignee: Christian Hammers
fixed in svn
> Unittest fail due to changed default of xmlLayout->setLocationInfo
> ------------------------------------------------------------------
>
> Key: LOG4PHP-85
> URL: https://issues.apache.org/jira/browse/LOG4PHP-85
> Project: Log4php
> Issue Type: Bug
> Components: Tests
> Affects Versions: 2.0
> Reporter: Christian Hammers
> Assignee: Christian Hammers
> Fix For: 2.0
>
>
> Currently the unit tests on my working copy fail with:
> 1) testSocketXml(LoggerAppenderSocketTest)
> Failed asserting that two strings are equal.
> --- Expected
> +++ Actual
> @@ -1,5 +1,4 @@
> DRY MODE OF SOCKET APPENDER: <log4php:event logger="TEST" level="ERROR" thread="11857" timestamp="1252964319758">
> <log4php:message><![CDATA[testmessage]]></log4php:message>
> -<log4php:locationInfo class="LoggerLoggingEvent" file="NA" line="NA" method="getLocationInformation" />
> </log4php:event>
> They do not on the current trunk at r814880. On further investigation I found that the output of a LoggerAppenderSocket, which internally uses an LoggerLayoutXML is compared to a pure LoggerLayoutXML.
> The first LoggerAppenderSocket though has locationInfo=false as default and passes this on to the layout. The newly created layout still has this value on true.
> So in fact the test should have failed all the time and does now as I already have the new toBoolean method (see bug 81). A patch would be:
> --- src/test/php/appenders/LoggerAppenderSocketTest.php (Revision 814880)
> +++ src/test/php/appenders/LoggerAppenderSocketTest.php (Arbeitskopie)
> @@ -50,6 +50,7 @@
> $appender->setDry(true);
> $appender->setUseXml(true);
> + $appender->setLocationInfo(true);
> $appender->activateOptions();
> $event = new LoggerLoggingEvent("LoggerAppenderSocketTest", new Logger("TEST"), LoggerLevel::getLevelError(), "testmessage");
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.