logging-log4cxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject cvs commit: logging-log4cxx/tests/witness xmlLayout.2
Date Mon, 03 Jan 2005 06:43:45 GMT
carnold     2005/01/02 22:43:45

  Modified:    include/log4cxx/spi loggingevent.h
               src      patternparser.cpp properties.cpp
                        relativetimedateformat.cpp stringhelper.cpp
                        ttcclayout.cpp xmllayout.cpp
               tests/src asyncappendertestcase.cpp filetestcase.cpp
                        minimumtestcase.cpp patternlayouttest.cpp
               tests/src/helpers Makefile.am
               tests/src/net socketservertestcase.cpp
               tests/src/util filter.h threadfilter.cpp xmlthreadfilter.cpp
               tests/src/varia levelrangefiltertestcase.cpp
               tests/src/xml domtestcase.cpp xmllayouttestcase.cpp
               tests/witness xmlLayout.2
  Added:       tests/src/helpers propertiestestcase.cpp
  Log:
  LOGCXX-10: Closing in
  
  Revision  Changes    Path
  1.24      +3 -1      logging-log4cxx/include/log4cxx/spi/loggingevent.h
  
  Index: loggingevent.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/spi/loggingevent.h,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- loggingevent.h	2 Jan 2005 05:40:04 -0000	1.23
  +++ loggingevent.h	3 Jan 2005 06:43:44 -0000	1.24
  @@ -108,7 +108,9 @@
                           static log4cxx_time_t getStartTime();
   
                           /** Return the #threadName of this event. */
  -                        const LogString& getThreadName() const;
  +                        inline const LogString& getThreadName() const {
  +                             return threadName;
  +                        }
   
                           /** Return the #timeStamp of this event. */
                           inline log4cxx_time_t getTimeStamp() const
  
  
  
  1.24      +7 -2      logging-log4cxx/src/patternparser.cpp
  
  Index: patternparser.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/patternparser.cpp,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- patternparser.cpp	2 Jan 2005 05:40:05 -0000	1.23
  +++ patternparser.cpp	3 Jan 2005 06:43:44 -0000	1.24
  @@ -146,7 +146,11 @@
                                           i++; // move pointer
                                           break;
                                   case LOG4CXX_STR('n'):
  -                                        currentLiteral.append(1, LOG4CXX_STR('\n'));
  +#if defined(_WIN32)
  +                                        currentLiteral.append(LOG4CXX_STR("\x0D\x0A"));
  +#else
  +                                        currentLiteral.append(1, LOG4CXX_STR('\x0A'));
  +#endif
                                           i++; // move pointer
                                           break;
                                   default:
  @@ -508,8 +512,9 @@
           {
           case FULL_LOCATION_CONVERTER:
                   Transcoder::decode(locInfo.getFileName(), sbuf);
  -                sbuf.append(1, LOG4CXX_STR(':'));
  +                sbuf.append(1, LOG4CXX_STR('('));
                   sbuf.append(StringHelper::toString(locInfo.getLineNumber(), pool));
  +                sbuf.append(1, LOG4CXX_STR(')'));
                   break;
           case LINE_LOCATION_CONVERTER:
                   sbuf.append(StringHelper::toString(locInfo.getLineNumber(), pool));
  
  
  
  1.12      +347 -352  logging-log4cxx/src/properties.cpp
  
  Index: properties.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/properties.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- properties.cpp	18 Dec 2004 07:53:05 -0000	1.11
  +++ properties.cpp	3 Jan 2005 06:43:44 -0000	1.12
  @@ -1,353 +1,348 @@
  -/*
  - * Copyright 2003,2004 The Apache Software Foundation.
  - *
  - * Licensed under the Apache License, Version 2.0 (the "License");
  - * you may not use this file except in compliance with the License.
  - * You may obtain a copy of the License at
  - *
  - *      http://www.apache.org/licenses/LICENSE-2.0
  - *
  - * Unless required by applicable law or agreed to in writing, software
  - * distributed under the License is distributed on an "AS IS" BASIS,
  - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - * See the License for the specific language governing permissions and
  - * limitations under the License.
  - */
  -
  +/*
  + * Copyright 2003-2005 The Apache Software Foundation.
  + *
  + * Licensed under the Apache License, Version 2.0 (the "License");
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
  + *
  + *      http://www.apache.org/licenses/LICENSE-2.0
  + *
  + * Unless required by applicable law or agreed to in writing, software
  + * distributed under the License is distributed on an "AS IS" BASIS,
  + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + * See the License for the specific language governing permissions and
  + * limitations under the License.
  + */
  +
   #include <log4cxx/helpers/properties.h>
  -#include <log4cxx/helpers/exception.h>
  -
  -using namespace log4cxx;
  -using namespace log4cxx::helpers;
  -
  -class PropertyParser
  -{
  -public:
  -	void parse(LogString& in, Properties& properties)
  -	{
  -		LogString key, element;
  -		LexemType lexemType = BEGIN;
  -		logchar c;
  -		bool finished = false;
  -
  -		if (!get(in, c))
  -		{
  -			return;
  -		}
  -
  -		while (!finished)
  -		{
  -			switch(lexemType)
  -			{
  -			case BEGIN:
  -				switch(c)
  -				{
  -				case LOG4CXX_STR(' '):
  -				case LOG4CXX_STR('\t'):
  -				case LOG4CXX_STR('\n'):
  -				case LOG4CXX_STR('\r'):
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				case LOG4CXX_STR('#'):
  -				case LOG4CXX_STR('!'):
  -					lexemType = COMMENT;
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				default:
  -					lexemType = KEY;
  -					break;
  -				}
  -				break;
  -
  -			case KEY:
  -				switch(c)
  -				{
  -				case LOG4CXX_STR('\\'):
  -					lexemType = KEY_ESCAPE;
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				case LOG4CXX_STR('\t'):
  -				case LOG4CXX_STR(' '):
  -				case LOG4CXX_STR(':'):
  -				case LOG4CXX_STR('='):
  -					lexemType = DELIMITER;
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				case LOG4CXX_STR('\n'):
  -				case LOG4CXX_STR('\r'):
  -					// key associated with an empty string element
  -					properties.setProperty(key, LOG4CXX_STR(""));
  -					key.erase(key.begin(), key.end());
  -					lexemType = BEGIN;
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				default:
  -					key.append(1, c);
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -				}
  -				break;
  -
  -			case KEY_ESCAPE:
  -				switch(c)
  -				{
  -				case LOG4CXX_STR('\t'):
  -				case LOG4CXX_STR(' '):
  -				case LOG4CXX_STR(':'):
  -				case LOG4CXX_STR('='):
  -				case LOG4CXX_STR('\\'):
  -					key.append(1, c);
  -					lexemType = KEY;
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				case LOG4CXX_STR('\n'):
  -					lexemType = KEY_CONTINUE;
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				case LOG4CXX_STR('\r'):
  -					lexemType = KEY_CONTINUE2;
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -				}
  -				break;
  -
  -			case KEY_CONTINUE:
  -				switch(c)
  -				{
  -				case LOG4CXX_STR(' '):
  -				case LOG4CXX_STR('\t'):
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				default:
  -					lexemType = KEY;
  -					break;
  -				}
  -				break;
  -
  -			case KEY_CONTINUE2:
  -				switch(c)
  -				{
  -				case LOG4CXX_STR('\n'):
  -					if (!get(in, c))
  -						finished = true;
  -					lexemType = KEY_CONTINUE;
  -					break;
  -
  -				default:
  -					lexemType = KEY_CONTINUE;
  -					break;
  -				}
  -				break;
  -
  -			case DELIMITER:
  -				switch(c)
  -				{
  -				case LOG4CXX_STR('\t'):
  -				case LOG4CXX_STR(' '):
  -				case LOG4CXX_STR(':'):
  -				case LOG4CXX_STR('='):
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				default:
  -					lexemType = ELEMENT;
  -					break;
  -				}
  -				break;
  -
  -			case ELEMENT:
  -				switch(c)
  -				{
  -				case LOG4CXX_STR('\\'):
  -					lexemType = ELEMENT_ESCAPE;
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				case LOG4CXX_STR('\n'):
  -				case LOG4CXX_STR('\r'):
  -					// key associated with an empty string element
  -					properties.setProperty(key, element);
  -					key.erase(key.begin(), key.end());
  -					element.erase(element.begin(), element.end());
  -					lexemType = BEGIN;
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				default:
  -					element.append(1, c);
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -				}
  -				break;
  -
  -			case ELEMENT_ESCAPE:
  -				switch(c)
  -				{
  -				case LOG4CXX_STR('t'):
  -				case LOG4CXX_STR(' '):
  -				case LOG4CXX_STR('n'):
  -				case LOG4CXX_STR('r'):
  -				case LOG4CXX_STR('\''):
  -				case LOG4CXX_STR('\\'):
  -				case LOG4CXX_STR('\"'):
  -				case LOG4CXX_STR(':'):
  -				default:
  -					element.append(1, c);
  -					lexemType = ELEMENT;
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				case LOG4CXX_STR('\n'):
  -					lexemType = ELEMENT_CONTINUE;
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				case LOG4CXX_STR('\r'):
  -					lexemType = ELEMENT_CONTINUE2;
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -				}
  -				break;
  -
  -			case ELEMENT_CONTINUE:
  -				switch(c)
  -				{
  -				case LOG4CXX_STR(' '):
  -				case LOG4CXX_STR('\t'):
  -					if (!get(in, c))
  -						finished = true;
  -					break;
  -
  -				default:
  -					lexemType = ELEMENT;
  -					break;
  -				}
  -				break;
  -
  -			case ELEMENT_CONTINUE2:
  -				switch(c)
  -				{
  -				case LOG4CXX_STR('\n'):
  -					if (!get(in, c))
  -						finished = true;
  -					lexemType = ELEMENT_CONTINUE;
  -					break;
  -
  -				default:
  -					lexemType = ELEMENT_CONTINUE;
  -					break;
  -				}
  -				break;
  -
  -			case COMMENT:
  -				if (c == LOG4CXX_STR('\n') || c == LOG4CXX_STR('\r'))
  -				{
  -					lexemType = BEGIN;
  -				}
  -				if (!get(in, c))
  -					finished = true;
  -				break;
  -			}
  -		}
  -
  -		if (!key.empty())
  -		{
  -			properties.setProperty(key, element);
  -		}
  -	}
  -
  -protected:
  -	bool get(LogString& in, logchar& c)
  -	{
  -                if (in.empty()) {
  -                    throw IOException();
  -                }
  -                c = in[0];
  -                in.erase(in.begin());
  -
  -		if (in.empty())
  -		{
  -			return false;
  -		}
  -
  -		return true;
  -	}
  -
  -	typedef enum
  -	{
  -		BEGIN,
  -		KEY,
  -		KEY_ESCAPE,
  -		KEY_CONTINUE,
  -		KEY_CONTINUE2,
  -		DELIMITER,
  -		ELEMENT,
  -		ELEMENT_ESCAPE,
  -		ELEMENT_CONTINUE,
  -		ELEMENT_CONTINUE2,
  -		COMMENT
  -	}
  -	LexemType;
  -};
  -
  -LogString Properties::setProperty(const LogString& key, const LogString& value)
  -{
  -	LogString oldValue(properties[key]);
  -	properties[key] = value;
  -	//tcout << LOG4CXX_STR("setting property key=") << key << LOG4CXX_STR(", value=") << value << std::endl;
  -	return oldValue;
  -}
  -
  -LogString Properties::getProperty(const LogString& key) const
  -{
  -	std::map<LogString, LogString>::const_iterator it = properties.find(key);
  -	return (it != properties.end()) ? it->second : LogString();
  -}
  -
  -void Properties::load(LogString& inStream)
  -{
  -	properties.clear();
  -	PropertyParser parser;
  -	parser.parse(inStream, *this);
  -}
  -
  -std::vector<LogString> Properties::propertyNames() const
  -{
  -	std::vector<LogString> names;
  -	names.reserve(properties.size());
  -
  -	std::map<LogString, LogString>::const_iterator it;
  -	for (it = properties.begin(); it != properties.end(); it++)
  -	{
  -		const LogString& key = it->first;
  -		names.push_back(key);
  -	}
  -
  -	return names;
  -}
  -
  +#include <log4cxx/helpers/exception.h>
  +
  +using namespace log4cxx;
  +using namespace log4cxx::helpers;
  +
  +class PropertyParser
  +{
  +public:
  +        void parse(LogString& in, Properties& properties)
  +        {
  +                LogString key, element;
  +                LexemType lexemType = BEGIN;
  +                logchar c;
  +                bool finished = false;
  +
  +                if (!get(in, c))
  +                {
  +                        return;
  +                }
  +
  +                while (!finished)
  +                {
  +                        switch(lexemType)
  +                        {
  +                        case BEGIN:
  +                                switch(c)
  +                                {
  +                                case LOG4CXX_STR(' '):
  +                                case LOG4CXX_STR('\t'):
  +                                case LOG4CXX_STR('\n'):
  +                                case LOG4CXX_STR('\r'):
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                case LOG4CXX_STR('#'):
  +                                case LOG4CXX_STR('!'):
  +                                        lexemType = COMMENT;
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                default:
  +                                        lexemType = KEY;
  +                                        break;
  +                                }
  +                                break;
  +
  +                        case KEY:
  +                                switch(c)
  +                                {
  +                                case LOG4CXX_STR('\\'):
  +                                        lexemType = KEY_ESCAPE;
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                case LOG4CXX_STR('\t'):
  +                                case LOG4CXX_STR(' '):
  +                                case LOG4CXX_STR(':'):
  +                                case LOG4CXX_STR('='):
  +                                        lexemType = DELIMITER;
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                case LOG4CXX_STR('\n'):
  +                                case LOG4CXX_STR('\r'):
  +                                        // key associated with an empty string element
  +                                        properties.setProperty(key, LOG4CXX_STR(""));
  +                                        key.erase(key.begin(), key.end());
  +                                        lexemType = BEGIN;
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                default:
  +                                        key.append(1, c);
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +                                }
  +                                break;
  +
  +                        case KEY_ESCAPE:
  +                                switch(c)
  +                                {
  +                                case LOG4CXX_STR('\t'):
  +                                case LOG4CXX_STR(' '):
  +                                case LOG4CXX_STR(':'):
  +                                case LOG4CXX_STR('='):
  +                                case LOG4CXX_STR('\\'):
  +                                        key.append(1, c);
  +                                        lexemType = KEY;
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                case LOG4CXX_STR('\n'):
  +                                        lexemType = KEY_CONTINUE;
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                case LOG4CXX_STR('\r'):
  +                                        lexemType = KEY_CONTINUE2;
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +                                }
  +                                break;
  +
  +                        case KEY_CONTINUE:
  +                                switch(c)
  +                                {
  +                                case LOG4CXX_STR(' '):
  +                                case LOG4CXX_STR('\t'):
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                default:
  +                                        lexemType = KEY;
  +                                        break;
  +                                }
  +                                break;
  +
  +                        case KEY_CONTINUE2:
  +                                switch(c)
  +                                {
  +                                case LOG4CXX_STR('\n'):
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        lexemType = KEY_CONTINUE;
  +                                        break;
  +
  +                                default:
  +                                        lexemType = KEY_CONTINUE;
  +                                        break;
  +                                }
  +                                break;
  +
  +                        case DELIMITER:
  +                                switch(c)
  +                                {
  +                                case LOG4CXX_STR('\t'):
  +                                case LOG4CXX_STR(' '):
  +                                case LOG4CXX_STR(':'):
  +                                case LOG4CXX_STR('='):
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                default:
  +                                        lexemType = ELEMENT;
  +                                        break;
  +                                }
  +                                break;
  +
  +                        case ELEMENT:
  +                                switch(c)
  +                                {
  +                                case LOG4CXX_STR('\\'):
  +                                        lexemType = ELEMENT_ESCAPE;
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                case LOG4CXX_STR('\n'):
  +                                case LOG4CXX_STR('\r'):
  +                                        // key associated with an empty string element
  +                                        properties.setProperty(key, element);
  +                                        key.erase(key.begin(), key.end());
  +                                        element.erase(element.begin(), element.end());
  +                                        lexemType = BEGIN;
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                default:
  +                                        element.append(1, c);
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +                                }
  +                                break;
  +
  +                        case ELEMENT_ESCAPE:
  +                                switch(c)
  +                                {
  +                                case LOG4CXX_STR('t'):
  +                                case LOG4CXX_STR(' '):
  +                                case LOG4CXX_STR('n'):
  +                                case LOG4CXX_STR('r'):
  +                                case LOG4CXX_STR('\''):
  +                                case LOG4CXX_STR('\\'):
  +                                case LOG4CXX_STR('\"'):
  +                                case LOG4CXX_STR(':'):
  +                                default:
  +                                        element.append(1, c);
  +                                        lexemType = ELEMENT;
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                case LOG4CXX_STR('\n'):
  +                                        lexemType = ELEMENT_CONTINUE;
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                case LOG4CXX_STR('\r'):
  +                                        lexemType = ELEMENT_CONTINUE2;
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +                                }
  +                                break;
  +
  +                        case ELEMENT_CONTINUE:
  +                                switch(c)
  +                                {
  +                                case LOG4CXX_STR(' '):
  +                                case LOG4CXX_STR('\t'):
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        break;
  +
  +                                default:
  +                                        lexemType = ELEMENT;
  +                                        break;
  +                                }
  +                                break;
  +
  +                        case ELEMENT_CONTINUE2:
  +                                switch(c)
  +                                {
  +                                case LOG4CXX_STR('\n'):
  +                                        if (!get(in, c))
  +                                                finished = true;
  +                                        lexemType = ELEMENT_CONTINUE;
  +                                        break;
  +
  +                                default:
  +                                        lexemType = ELEMENT_CONTINUE;
  +                                        break;
  +                                }
  +                                break;
  +
  +                        case COMMENT:
  +                                if (c == LOG4CXX_STR('\n') || c == LOG4CXX_STR('\r'))
  +                                {
  +                                        lexemType = BEGIN;
  +                                }
  +                                if (!get(in, c))
  +                                        finished = true;
  +                                break;
  +                        }
  +                }
  +
  +                if (!key.empty())
  +                {
  +                        properties.setProperty(key, element);
  +                }
  +        }
  +
  +protected:
  +        bool get(LogString& in, logchar& c)
  +        {
  +                if (in.empty()) {
  +                    c = 0;
  +                    return false;
  +                }
  +                c = in[0];
  +                in.erase(in.begin());
  +                return true;
  +        }
  +
  +        typedef enum
  +        {
  +                BEGIN,
  +                KEY,
  +                KEY_ESCAPE,
  +                KEY_CONTINUE,
  +                KEY_CONTINUE2,
  +                DELIMITER,
  +                ELEMENT,
  +                ELEMENT_ESCAPE,
  +                ELEMENT_CONTINUE,
  +                ELEMENT_CONTINUE2,
  +                COMMENT
  +        }
  +        LexemType;
  +};
  +
  +LogString Properties::setProperty(const LogString& key, const LogString& value)
  +{
  +        LogString oldValue(properties[key]);
  +        properties[key] = value;
  +        //tcout << LOG4CXX_STR("setting property key=") << key << LOG4CXX_STR(", value=") << value << std::endl;
  +        return oldValue;
  +}
  +
  +LogString Properties::getProperty(const LogString& key) const
  +{
  +        std::map<LogString, LogString>::const_iterator it = properties.find(key);
  +        return (it != properties.end()) ? it->second : LogString();
  +}
  +
  +void Properties::load(LogString& inStream)
  +{
  +        properties.clear();
  +        PropertyParser parser;
  +        parser.parse(inStream, *this);
  +}
  +
  +std::vector<LogString> Properties::propertyNames() const
  +{
  +        std::vector<LogString> names;
  +        names.reserve(properties.size());
  +
  +        std::map<LogString, LogString>::const_iterator it;
  +        for (it = properties.begin(); it != properties.end(); it++)
  +        {
  +                const LogString& key = it->first;
  +                names.push_back(key);
  +        }
  +
  +        return names;
  +}
  +
  
  
  
  1.8       +3 -15     logging-log4cxx/src/relativetimedateformat.cpp
  
  Index: relativetimedateformat.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/relativetimedateformat.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- relativetimedateformat.cpp	26 Dec 2004 07:31:53 -0000	1.7
  +++ relativetimedateformat.cpp	3 Jan 2005 06:43:44 -0000	1.8
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2004 The Apache Software Foundation.
  + * Copyright 2004-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -37,18 +37,6 @@
       LogString &s,
       log4cxx_time_t date,
       Pool& p) const {
  -    apr_interval_time_t interval = date - startTime;
  -    apr_interval_time_t ms = interval / 1000;
  -    if (ms >= INT_MIN && ms <= INT_MAX) {
  -      s.append(StringHelper::toString(ms, p));
  -    } else {
  -      const log4cxx_int64_t BILLION = APR_INT64_C(1000000000);
  -      s.append(StringHelper::toString(ms / BILLION, p));
  -      LogString lower(StringHelper::toString(ms % BILLION, p));
  -      int fill = 9 - lower.length();
  -      if (fill > 0) {
  -        s.append(fill, LOG4CXX_STR('0'));
  -      }
  -      s.append(lower);
  -    }
  +    apr_int64_t interval = (date - startTime) / APR_INT64_C(1000);
  +    s.append(StringHelper::toString(interval, p));
   }
  
  
  
  1.10      +1 -1      logging-log4cxx/src/stringhelper.cpp
  
  Index: stringhelper.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/stringhelper.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- stringhelper.cpp	2 Jan 2005 05:40:05 -0000	1.9
  +++ stringhelper.cpp	3 Jan 2005 06:43:44 -0000	1.10
  @@ -217,7 +217,7 @@
       int billions = (int) (n / BILLION);
       s.append(apr_itoa((apr_pool_t*) pool.getAPRPool(), billions));
       int remain = (n - billions * BILLION);
  -    if (remain < 0) remain += BILLION;
  +    if (remain < 0) remain *= -1;
       char* lower = apr_itoa((apr_pool_t*) pool.getAPRPool(), remain);
       int fill = 9 - strlen(lower);
       s.append(fill, LOG4CXX_STR('0'));
  
  
  
  1.15      +1 -1      logging-log4cxx/src/ttcclayout.cpp
  
  Index: ttcclayout.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/ttcclayout.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ttcclayout.cpp	2 Jan 2005 05:40:05 -0000	1.14
  +++ ttcclayout.cpp	3 Jan 2005 06:43:44 -0000	1.15
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2003,2004 The Apache Software Foundation.
  + * Copyright 2003-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  
  
  
  1.21      +1 -1      logging-log4cxx/src/xmllayout.cpp
  
  Index: xmllayout.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/xmllayout.cpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- xmllayout.cpp	2 Jan 2005 05:40:05 -0000	1.20
  +++ xmllayout.cpp	3 Jan 2005 06:43:44 -0000	1.21
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2003,2004 The Apache Software Foundation.
  + * Copyright 2003-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  
  
  
  1.15      +1 -1      logging-log4cxx/tests/src/asyncappendertestcase.cpp
  
  Index: asyncappendertestcase.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/asyncappendertestcase.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- asyncappendertestcase.cpp	2 Jan 2005 05:40:05 -0000	1.14
  +++ asyncappendertestcase.cpp	3 Jan 2005 06:43:44 -0000	1.15
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2003,2004 The Apache Software Foundation.
  + * Copyright 2003-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  
  
  
  1.6       +3 -1      logging-log4cxx/tests/src/filetestcase.cpp
  
  Index: filetestcase.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/filetestcase.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- filetestcase.cpp	26 Dec 2004 07:31:54 -0000	1.5
  +++ filetestcase.cpp	3 Jan 2005 06:43:44 -0000	1.6
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2004 The Apache Software Foundation.
  + * Copyright 2004-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -105,6 +105,8 @@
             LogString props(propFile.read(pool));
             LogString line1(LOG4CXX_STR("log4j.rootCategory=DEBUG, testAppender\n"));
             CPPUNIT_ASSERT_EQUAL(line1, props.substr(0, line1.length()));
  +          LogString tail(LOG4CXX_STR("%-5p - %m%n"));
  +          CPPUNIT_ASSERT_EQUAL(tail, props.substr(props.length() - tail.length()));
           }
   
           void propertyExists() {
  
  
  
  1.13      +2 -2      logging-log4cxx/tests/src/minimumtestcase.cpp
  
  Index: minimumtestcase.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/minimumtestcase.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- minimumtestcase.cpp	26 Dec 2004 07:31:54 -0000	1.12
  +++ minimumtestcase.cpp	3 Jan 2005 06:43:44 -0000	1.13
  @@ -44,11 +44,11 @@
   
   #define TTCC_PAT  \
           ABSOLUTE_DATE_AND_TIME_PAT \
  -        LOG4CXX_STR(" \\[\\d*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - Message \\d{1,2}")
  +        LOG4CXX_STR(" \\[0x[0-9A-F]*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - Message \\d{1,2}")
   
   #define TTCC2_PAT \
           ABSOLUTE_DATE_AND_TIME_PAT \
  -        LOG4CXX_STR(" \\[\\d*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - ") \
  +        LOG4CXX_STR(" \\[0x[0-9A-F]*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - ") \
           LOG4CXX_STR("Messages should bear numbers 0 through 23\\.")
   
   
  
  
  
  1.12      +7 -7      logging-log4cxx/tests/src/patternlayouttest.cpp
  
  Index: patternlayouttest.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/patternlayouttest.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- patternlayouttest.cpp	26 Dec 2004 07:31:54 -0000	1.11
  +++ patternlayouttest.cpp	3 Jan 2005 06:43:44 -0000	1.12
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2003,2004 The Apache Software Foundation.
  + * Copyright 2003-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -44,16 +44,16 @@
   
   
   
  -#define PAT0 LOG4CXX_STR("\\[\\d*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - Message \\d{1,2}")
  +#define PAT0 LOG4CXX_STR("\\[0x[0-9A-F]*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - Message \\d{1,2}")
   #define PAT1 ISO8601_PAT LOG4CXX_STR(" ") PAT0
   #define PAT2 ABSOLUTE_DATE_AND_TIME_PAT LOG4CXX_STR(" ") PAT0
   #define PAT3 ABSOLUTE_TIME_PAT LOG4CXX_STR(" ") PAT0
   #define PAT4 RELATIVE_TIME_PAT LOG4CXX_STR(" ") PAT0
  -#define PAT5 LOG4CXX_STR("\\[\\d*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* : Message \\d{1,2}")
  -#define PAT6 LOG4CXX_STR("\\[\\d*]\\ (DEBUG|INFO |WARN |ERROR|FATAL) .*patternlayouttest.cpp\\(\\d{1,4}\\): Message \\d{1,3}")
  -#define PAT11a LOG4CXX_STR("^(DEBUG|INFO |WARN |ERROR|FATAL) \\[\\d*]\\ log4j.PatternLayoutTest: Message \\d{1,2}")
  -#define PAT11b LOG4CXX_STR("^(DEBUG|INFO |WARN |ERROR|FATAL) \\[\\d*]\\ root: Message \\d{1,2}")
  -#define PAT12 LOG4CXX_STR("^\\[\\d*]\\ (DEBUG|INFO |WARN |ERROR|FATAL) ")\
  +#define PAT5 LOG4CXX_STR("\\[0x[0-9A-F]*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* : Message \\d{1,2}")
  +#define PAT6 LOG4CXX_STR("\\[0x[0-9A-F]*]\\ (DEBUG|INFO |WARN |ERROR|FATAL) .*patternlayouttest.cpp\\(\\d{1,4}\\): Message \\d{1,3}")
  +#define PAT11a LOG4CXX_STR("^(DEBUG|INFO |WARN |ERROR|FATAL) \\[0x[0-9A-F]*]\\ log4j.PatternLayoutTest: Message \\d{1,2}")
  +#define PAT11b LOG4CXX_STR("^(DEBUG|INFO |WARN |ERROR|FATAL) \\[0x[0-9A-F]*]\\ root: Message \\d{1,2}")
  +#define PAT12 LOG4CXX_STR("^\\[0x[0-9A-F]*]\\ (DEBUG|INFO |WARN |ERROR|FATAL) ")\
       LOG4CXX_STR(".*patternlayouttest.cpp\\(\\d{1,4}\\): ")\
       LOG4CXX_STR("Message \\d{1,2}")
   #define PAT_MDC_1 LOG4CXX_STR("")
  
  
  
  1.8       +1 -0      logging-log4cxx/tests/src/helpers/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/helpers/Makefile.am,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Makefile.am	15 Dec 2004 08:10:40 -0000	1.7
  +++ Makefile.am	3 Jan 2005 06:43:44 -0000	1.8
  @@ -13,6 +13,7 @@
           datetimedateformattestcase.cpp \
           iso8601dateformattestcase.cpp \
           optionconvertertestcase.cpp       \
  +        propertiestestcase.cpp \
           relativetimedateformattestcase.cpp \
           stringtokenizertestcase.cpp \
           timezonetestcase.cpp \
  
  
  
  1.1                  logging-log4cxx/tests/src/helpers/propertiestestcase.cpp
  
  Index: propertiestestcase.cpp
  ===================================================================
  /*
   * Copyright 2005 The Apache Software Foundation.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  #include <cppunit/extensions/HelperMacros.h>
  #include <log4cxx/helpers/properties.h>
  #include "../insertwide.h"
  
  using namespace log4cxx;
  using namespace log4cxx::helpers;
  
  
  class PropertiesTestCase : public CppUnit::TestFixture
  {
          CPPUNIT_TEST_SUITE(PropertiesTestCase);
                  CPPUNIT_TEST(testLoad1);
          CPPUNIT_TEST_SUITE_END();
  
  public:
          void testLoad1() {
            //
            //    line from patternLayout1.properties
            LogString line(LOG4CXX_STR("log4j.appender.testAppender.layout.ConversionPattern=%-5p - %m%n"));
            Properties properties;
            properties.load(line);
            LogString pattern(properties.getProperty(LOG4CXX_STR("log4j.appender.testAppender.layout.ConversionPattern")));
            CPPUNIT_ASSERT_EQUAL((LogString) LOG4CXX_STR("%-5p - %m%n"), pattern);
          }
  };
  
  
  CPPUNIT_TEST_SUITE_REGISTRATION(PropertiesTestCase);
  
  
  
  1.15      +9 -9      logging-log4cxx/tests/src/net/socketservertestcase.cpp
  
  Index: socketservertestcase.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/net/socketservertestcase.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- socketservertestcase.cpp	26 Dec 2004 07:31:55 -0000	1.14
  +++ socketservertestcase.cpp	3 Jan 2005 06:43:44 -0000	1.15
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2003,2004 The Apache Software Foundation.
  + * Copyright 2003-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -59,38 +59,38 @@
   // %5p %x [%t] %c %m%n
   // DEBUG T1 [thread] org.apache.log4j.net.SocketAppenderTestCase Message 1
   #define PAT1 \
  -        LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) T1 \\[\\d*]\\ ") \
  +        LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) T1 \\[0x[0-9A-F]*]\\ ") \
           LOG4CXX_STR(".* Message \\d{1,2}")
   
   // DEBUG T2 [thread] patternlayouttest.cpp(?) Message 1
   #define PAT2 \
  -        LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) T2 \\[\\d*]\\ ") \
  +        LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) T2 \\[0x[0-9A-F]*]\\ ") \
           LOG4CXX_STR(".*socketservertestcase.cpp\\(\\d{1,4}\\) Message \\d{1,2}")
   
   // DEBUG T3 [thread] patternlayouttest.cpp(?) Message 1
   #define PAT3 \
  -        LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) T3 \\[\\d*]\\ ") \
  +        LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) T3 \\[0x[0-9A-F]*]\\ ") \
           LOG4CXX_STR(".*socketservertestcase.cpp\\(\\d{1,4}\\) Message \\d{1,2}")
   
   // DEBUG some T4 MDC-TEST4 [thread] SocketAppenderTestCase - Message 1
   // DEBUG some T4 MDC-TEST4 [thread] SocketAppenderTestCase - Message 1
   #define PAT4 \
  -        LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) some T4 MDC-TEST4 \\[\\d*]\\") \
  +        LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) some T4 MDC-TEST4 \\[0x[0-9A-F]*]\\") \
           LOG4CXX_STR(" (root|SocketServerTestCase) - Message \\d{1,2}")
   #define PAT5 \
  -        LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) some5 T5 MDC-TEST5 \\[\\d*]\\") \
  +        LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) some5 T5 MDC-TEST5 \\[0x[0-9A-F]*]\\") \
           LOG4CXX_STR(" (root|SocketServerTestCase) - Message \\d{1,2}")
   #define PAT6 \
           LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) some6 T6 client-test6 MDC-TEST6") \
  -        LOG4CXX_STR(" \\[\\d*]\\ (root|SocketServerTestCase) - Message \\d{1,2}")
  +        LOG4CXX_STR(" \\[0x[0-9A-F]*]\\ (root|SocketServerTestCase) - Message \\d{1,2}")
   #define PAT7 \
           LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) some7 T7 client-test7 MDC-TEST7") \
  -        LOG4CXX_STR(" \\[\\d*]\\ (root|SocketServerTestCase) - Message \\d{1,2}")
  +        LOG4CXX_STR(" \\[0x[0-9A-F]*]\\ (root|SocketServerTestCase) - Message \\d{1,2}")
   
   // DEBUG some8 T8 shortSocketServer MDC-TEST7 [thread] SocketServerTestCase - Message 1
   #define PAT8 \
           LOG4CXX_STR("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) some8 T8 shortSocketServer") \
  -        LOG4CXX_STR(" MDC-TEST8 \\[\\d*]\\ (root|SocketServerTestCase) - Message \\d{1,2}")
  +        LOG4CXX_STR(" MDC-TEST8 \\[0x[0-9A-F]*]\\ (root|SocketServerTestCase) - Message \\d{1,2}")
   
   class ShortSocketServerLauncher
   {
  
  
  
  1.11      +2 -2      logging-log4cxx/tests/src/util/filter.h
  
  Index: filter.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/util/filter.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- filter.h	2 Jan 2005 05:40:05 -0000	1.10
  +++ filter.h	3 Jan 2005 06:43:44 -0000	1.11
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2003,2004 The Apache Software Foundation.
  + * Copyright 2003-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -20,7 +20,7 @@
   #include <log4cxx/logstring.h>
   #include <log4cxx/helpers/exception.h>
   
  -#define BASIC_PAT LOG4CXX_STR("\\[\\d*\\] (FATAL|ERROR|WARN|INFO|DEBUG)")
  +#define BASIC_PAT LOG4CXX_STR("\\[0x[0-9A-F]*] (FATAL|ERROR|WARN|INFO|DEBUG)")
   #define ISO8601_PAT LOG4CXX_STR("^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3}")
   #define ABSOLUTE_DATE_AND_TIME_PAT \
           LOG4CXX_STR("^\\d{1,2} .{2,6}\\.? 200\\d \\d{2}:\\d{2}:\\d{2},\\d{3}")
  
  
  
  1.7       +2 -2      logging-log4cxx/tests/src/util/threadfilter.cpp
  
  Index: threadfilter.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/util/threadfilter.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- threadfilter.cpp	2 Jan 2005 05:40:05 -0000	1.6
  +++ threadfilter.cpp	3 Jan 2005 06:43:44 -0000	1.7
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2003,2004 The Apache Software Foundation.
  + * Copyright 2003-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -22,5 +22,5 @@
   LogString ThreadFilter::filter(const LogString& in)
           const throw(UnexpectedFormatException)
   {
  -        return merge(LOG4CXX_STR("\\[0x[0-9A-F]*\\]"), in, LOG4CXX_STR("\\[main]"));
  +        return merge(LOG4CXX_STR("\\[0x[0-9A-F]*]"), in, LOG4CXX_STR("\\[main]"));
   }
  
  
  
  1.5       +1 -1      logging-log4cxx/tests/src/util/xmlthreadfilter.cpp
  
  Index: xmlthreadfilter.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/util/xmlthreadfilter.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- xmlthreadfilter.cpp	2 Jan 2005 05:40:05 -0000	1.4
  +++ xmlthreadfilter.cpp	3 Jan 2005 06:43:44 -0000	1.5
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2003,2004 The Apache Software Foundation.
  + * Copyright 2003-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  
  
  
  1.7       +2 -2      logging-log4cxx/tests/src/varia/levelrangefiltertestcase.cpp
  
  Index: levelrangefiltertestcase.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/varia/levelrangefiltertestcase.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- levelrangefiltertestcase.cpp	26 Dec 2004 07:31:55 -0000	1.6
  +++ levelrangefiltertestcase.cpp	3 Jan 2005 06:43:44 -0000	1.7
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2003,2004 The Apache Software Foundation.
  + * Copyright 2003-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -149,7 +149,7 @@
           {
                   // set up appender
                   LayoutPtr layout = new SimpleLayout();
  -                AppenderPtr appender = new FileAppender(layout, ACCEPT_FILE, false);
  +                AppenderPtr appender = new FileAppender(layout, NEUTRAL_FILE, false);
   
                   // create LevelMatchFilter
                   LevelRangeFilterPtr rangeFilter = new LevelRangeFilter();
  
  
  
  1.5       +76 -76    logging-log4cxx/tests/src/xml/domtestcase.cpp
  
  Index: domtestcase.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/xml/domtestcase.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- domtestcase.cpp	13 May 2004 21:14:39 -0000	1.4
  +++ domtestcase.cpp	3 Jan 2005 06:43:44 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
  - * Copyright 2003,2004 The Apache Software Foundation.
  - * 
  + * Copyright 2003-2005 The Apache Software Foundation.
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -41,91 +41,91 @@
   #define FILTERED_A2 _T("output/filtered.A2")
   
   #define TEST1_1A_PAT \
  -	_T("(DEBUG|INFO |WARN |ERROR|FATAL) \\w*\\.\\w* - Message \\d")
  +        _T("(DEBUG|INFO |WARN |ERROR|FATAL) \\w*\\.\\w* - Message \\d")
   
   #define TEST1_1B_PAT _T("(DEBUG|INFO |WARN |ERROR|FATAL) root - Message \\d")
   
   #define TEST1_2_PAT _T("^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3} ") \
  -	_T("\\[\\d*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - Message \\d")
  +        _T("\\[0x[0-9A-F]*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - Message \\d")
   
   class DOMTestCase : public CppUnit::TestFixture
   {
  -	CPPUNIT_TEST_SUITE(DOMTestCase);
  -		CPPUNIT_TEST(test1);
  -	CPPUNIT_TEST_SUITE_END();
  +        CPPUNIT_TEST_SUITE(DOMTestCase);
  +                CPPUNIT_TEST(test1);
  +        CPPUNIT_TEST_SUITE_END();
   
  -	LoggerPtr root;
  -	LoggerPtr logger;
  +        LoggerPtr root;
  +        LoggerPtr logger;
   
   public:
  -	void setUp()
  -	{
  -		root = Logger::getRootLogger();
  -		logger = Logger::getLogger(_T("org.apache.log4j.xml.DOMTestCase"));
  -	}
  -
  -	void tearDown()
  -	{
  -		root->getLoggerRepository()->resetConfiguration();
  -	}
  -
  -	void test1()
  -	{
  -		DOMConfigurator::configure(_T("input/xml/DOMTestCase1.xml"));
  -		common();
  -
  -		ControlFilter cf1;
  -		cf1 << TEST1_1A_PAT << TEST1_1B_PAT;
  -
  -		ControlFilter cf2;
  -		cf2 << TEST1_2_PAT;
  -
  -		ThreadFilter threadFilter;
  -		ISO8601Filter iso8601Filter;
  -
  -		std::vector<Filter *> filters1;
  -		filters1.push_back(&cf1);
  -
  -		std::vector<Filter *> filters2;
  -		filters2.push_back(&cf2);
  -		filters2.push_back(&threadFilter);
  -		filters2.push_back(&iso8601Filter);
  -
  -		try
  -		{
  -			Transformer::transform(TEMP_A1, FILTERED_A1, filters1);
  -			Transformer::transform(TEMP_A2, FILTERED_A2, filters2);
  -		}
  -		catch(UnexpectedFormatException& e)
  -		{
  -			tcout << _T("UnexpectedFormatException :") << e.getMessage() << std::endl;
  -			throw;
  -		}
  - 
  -		CPPUNIT_ASSERT(Compare::compare(FILTERED_A1, _T("witness/dom.A1.1")));
  -		CPPUNIT_ASSERT(Compare::compare(FILTERED_A2, _T("witness/dom.A2.1")));
  -	}
  -
  -	void common()
  -	{
  -		int i = -1;
  -
  -		LOG4CXX_DEBUG(logger, _T("Message ") << ++i);
  -		LOG4CXX_DEBUG(root, _T("Message ") << i);
  -
  -		LOG4CXX_INFO(logger, _T("Message ") << ++i);
  -		LOG4CXX_INFO(root, _T("Message ") << i);
  -
  -		LOG4CXX_WARN(logger, _T("Message ") << ++i);
  -		LOG4CXX_WARN(root, _T("Message ") << i);
  +        void setUp()
  +        {
  +                root = Logger::getRootLogger();
  +                logger = Logger::getLogger(_T("org.apache.log4j.xml.DOMTestCase"));
  +        }
  +
  +        void tearDown()
  +        {
  +                root->getLoggerRepository()->resetConfiguration();
  +        }
  +
  +        void test1()
  +        {
  +                DOMConfigurator::configure(_T("input/xml/DOMTestCase1.xml"));
  +                common();
  +
  +                ControlFilter cf1;
  +                cf1 << TEST1_1A_PAT << TEST1_1B_PAT;
  +
  +                ControlFilter cf2;
  +                cf2 << TEST1_2_PAT;
  +
  +                ThreadFilter threadFilter;
  +                ISO8601Filter iso8601Filter;
  +
  +                std::vector<Filter *> filters1;
  +                filters1.push_back(&cf1);
  +
  +                std::vector<Filter *> filters2;
  +                filters2.push_back(&cf2);
  +                filters2.push_back(&threadFilter);
  +                filters2.push_back(&iso8601Filter);
  +
  +                try
  +                {
  +                        Transformer::transform(TEMP_A1, FILTERED_A1, filters1);
  +                        Transformer::transform(TEMP_A2, FILTERED_A2, filters2);
  +                }
  +                catch(UnexpectedFormatException& e)
  +                {
  +                        tcout << _T("UnexpectedFormatException :") << e.getMessage() << std::endl;
  +                        throw;
  +                }
  +
  +                CPPUNIT_ASSERT(Compare::compare(FILTERED_A1, _T("witness/dom.A1.1")));
  +                CPPUNIT_ASSERT(Compare::compare(FILTERED_A2, _T("witness/dom.A2.1")));
  +        }
  +
  +        void common()
  +        {
  +                int i = -1;
  +
  +                LOG4CXX_DEBUG(logger, _T("Message ") << ++i);
  +                LOG4CXX_DEBUG(root, _T("Message ") << i);
  +
  +                LOG4CXX_INFO(logger, _T("Message ") << ++i);
  +                LOG4CXX_INFO(root, _T("Message ") << i);
  +
  +                LOG4CXX_WARN(logger, _T("Message ") << ++i);
  +                LOG4CXX_WARN(root, _T("Message ") << i);
   
  -		LOG4CXX_ERROR(logger, _T("Message ") << ++i);
  -		LOG4CXX_ERROR(root, _T("Message ") << i);
  +                LOG4CXX_ERROR(logger, _T("Message ") << ++i);
  +                LOG4CXX_ERROR(root, _T("Message ") << i);
   
  -		LOG4CXX_FATAL(logger, _T("Message ") << ++i);
  -		LOG4CXX_FATAL(root, _T("Message ") << i);
  +                LOG4CXX_FATAL(logger, _T("Message ") << ++i);
  +                LOG4CXX_FATAL(root, _T("Message ") << i);
   
  -	}
  +        }
   };
   
   CPPUNIT_TEST_SUITE_REGISTRATION(DOMTestCase);
  
  
  
  1.8       +1 -1      logging-log4cxx/tests/src/xml/xmllayouttestcase.cpp
  
  Index: xmllayouttestcase.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/xml/xmllayouttestcase.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- xmllayouttestcase.cpp	26 Dec 2004 07:31:55 -0000	1.7
  +++ xmllayouttestcase.cpp	3 Jan 2005 06:43:44 -0000	1.8
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2003,2004 The Apache Software Foundation.
  + * Copyright 2003-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  
  
  
  1.4       +11 -11    logging-log4cxx/tests/witness/xmlLayout.2
  
  Index: xmlLayout.2
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/witness/xmlLayout.2,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- xmlLayout.2	2 Jan 2005 05:40:05 -0000	1.3
  +++ xmlLayout.2	3 Jan 2005 06:43:44 -0000	1.4
  @@ -1,44 +1,44 @@
   <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase$X" timestamp="XXX" level="INFO" thread="main">
   <log4j:message><![CDATA[in X() constructor]]></log4j:message>
  -<log4j:locationInfo class="XMLLayoutTestCase" method="locationInfo" file="xmllayouttestcase.cpp" line="X"/>
  +<log4j:locationInfo class="X" method="X" file="xmllayouttestcase.cpp" line="X"/>
   </log4j:event>
   <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="DEBUG" thread="main">
   <log4j:message><![CDATA[Message 0]]></log4j:message>
  -<log4j:locationInfo class="XMLLayoutTestCase" method="locationInfo" file="xmllayouttestcase.cpp" line="X"/>
  +<log4j:locationInfo class="XMLLayoutTestCase" method="common" file="xmllayouttestcase.cpp" line="X"/>
   </log4j:event>
   <log4j:event logger="root" timestamp="XXX" level="DEBUG" thread="main">
   <log4j:message><![CDATA[Message 0]]></log4j:message>
  -<log4j:locationInfo class="XMLLayoutTestCase" method="locationInfo" file="xmllayouttestcase.cpp" line="X"/>
  +<log4j:locationInfo class="XMLLayoutTestCase" method="common" file="xmllayouttestcase.cpp" line="X"/>
   </log4j:event>
   <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="INFO" thread="main">
   <log4j:message><![CDATA[Message 1]]></log4j:message>
  -<log4j:locationInfo class="XMLLayoutTestCase" method="locationInfo" file="xmllayouttestcase.cpp" line="X"/>
  +<log4j:locationInfo class="XMLLayoutTestCase" method="common" file="xmllayouttestcase.cpp" line="X"/>
   </log4j:event>
   <log4j:event logger="root" timestamp="XXX" level="INFO" thread="main">
   <log4j:message><![CDATA[Message 1]]></log4j:message>
  -<log4j:locationInfo class="XMLLayoutTestCase" method="locationInfo" file="xmllayouttestcase.cpp" line="X"/>
  +<log4j:locationInfo class="XMLLayoutTestCase" method="common" file="xmllayouttestcase.cpp" line="X"/>
   </log4j:event>
   <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="WARN" thread="main">
   <log4j:message><![CDATA[Message 2]]></log4j:message>
  -<log4j:locationInfo class="XMLLayoutTestCase" method="locationInfo" file="xmllayouttestcase.cpp" line="X"/>
  +<log4j:locationInfo class="XMLLayoutTestCase" method="common" file="xmllayouttestcase.cpp" line="X"/>
   </log4j:event>
   <log4j:event logger="root" timestamp="XXX" level="WARN" thread="main">
   <log4j:message><![CDATA[Message 2]]></log4j:message>
  -<log4j:locationInfo class="XMLLayoutTestCase" method="locationInfo" file="xmllayouttestcase.cpp" line="X"/>
  +<log4j:locationInfo class="XMLLayoutTestCase" method="common" file="xmllayouttestcase.cpp" line="X"/>
   </log4j:event>
   <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="ERROR" thread="main">
   <log4j:message><![CDATA[Message 3]]></log4j:message>
  -<log4j:locationInfo class="XMLLayoutTestCase" method="locationInfo" file="xmllayouttestcase.cpp" line="X"/>
  +<log4j:locationInfo class="XMLLayoutTestCase" method="common" file="xmllayouttestcase.cpp" line="X"/>
   </log4j:event>
   <log4j:event logger="root" timestamp="XXX" level="ERROR" thread="main">
   <log4j:message><![CDATA[Message 3]]></log4j:message>
  -<log4j:locationInfo class="XMLLayoutTestCase" method="locationInfo" file="xmllayouttestcase.cpp" line="X"/>
  +<log4j:locationInfo class="XMLLayoutTestCase" method="common" file="xmllayouttestcase.cpp" line="X"/>
   </log4j:event>
   <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="FATAL" thread="main">
   <log4j:message><![CDATA[Message 4]]></log4j:message>
  -<log4j:locationInfo class="XMLLayoutTestCase" method="locationInfo" file="xmllayouttestcase.cpp" line="X"/>
  +<log4j:locationInfo class="XMLLayoutTestCase" method="common" file="xmllayouttestcase.cpp" line="X"/>
   </log4j:event>
   <log4j:event logger="root" timestamp="XXX" level="FATAL" thread="main">
   <log4j:message><![CDATA[Message 4]]></log4j:message>
  -<log4j:locationInfo class="XMLLayoutTestCase" method="locationInfo" file="xmllayouttestcase.cpp" line="X"/>
  +<log4j:locationInfo class="XMLLayoutTestCase" method="common" file="xmllayouttestcase.cpp" line="X"/>
   </log4j:event>
  
  
  

Mime
View raw message