logging-log4php-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Hammers (JIRA)" <j...@apache.org>
Subject [jira] Created: (LOG4PHP-85) Unittest fail due to changed default of xmlLayout->setLocationInfo
Date Mon, 14 Sep 2009 22:11:57 GMT
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
            Reporter: Christian Hammers

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"
-<log4php:locationInfo class="LoggerLoggingEvent" file="NA" line="NA" method="getLocationInformation"

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
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->setLocationInfo(true);
                $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.

View raw message