objecthandler-cvs Mailing List for ObjectHandler (Page 21)
Brought to you by:
ericehlers,
nando
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(115) |
Jun
(109) |
Jul
(85) |
Aug
(49) |
Sep
(19) |
Oct
(105) |
Nov
(16) |
Dec
(43) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(63) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Eric E. <eri...@us...> - 2006-05-29 13:50:46
|
Update of /cvsroot/objecthandler/ObjectHandler/oh In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22141/oh Modified Files: logger.cpp Log Message: correct spelling of autolink.hpp Index: logger.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/logger.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** logger.cpp 25 May 2006 17:01:57 -0000 1.4 --- logger.cpp 29 May 2006 13:50:42 -0000 1.5 *************** *** 28,32 **** #ifdef BOOST_MSVC # define BOOST_LIB_DIAGNOSTIC ! # include <log4cxx/auto_link.hpp> # undef BOOST_LIB_DIAGNOSTIC #endif --- 28,32 ---- #ifdef BOOST_MSVC # define BOOST_LIB_DIAGNOSTIC ! # include <log4cxx/autolink.hpp> # undef BOOST_LIB_DIAGNOSTIC #endif |
From: Ferdinando A. <na...@us...> - 2006-05-25 17:02:27
|
Update of /cvsroot/objecthandler/ObjectHandler/xlsdk In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12155/xlsdk Modified Files: framewrk.cpp xlsdk.hpp xlsdk_vc8.vcproj Added Files: auto_link.hpp Removed Files: autolink.hpp Log Message: auto_linking Index: xlsdk.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/xlsdk/xlsdk.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xlsdk.hpp 19 May 2006 15:12:41 -0000 1.1 --- xlsdk.hpp 25 May 2006 17:01:57 -0000 1.2 *************** *** 20,24 **** #include <xlsdk/xlsdkdefines.hpp> - #include <xlsdk/autolink.hpp> #endif --- 20,23 ---- --- autolink.hpp DELETED --- Index: xlsdk_vc8.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/xlsdk/xlsdk_vc8.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xlsdk_vc8.vcproj 24 May 2006 09:42:09 -0000 1.2 --- xlsdk_vc8.vcproj 25 May 2006 17:01:57 -0000 1.3 *************** *** 44,48 **** InlineFunctionExpansion="1" AdditionalIncludeDirectories=".." ! PreprocessorDefinitions="NDEBUG;_LIB;WIN32;LOG4CXX_STATIC" StringPooling="true" RuntimeLibrary="0" --- 44,48 ---- InlineFunctionExpansion="1" AdditionalIncludeDirectories=".." ! PreprocessorDefinitions="BOOST_LIB_DIAGNOSTIC;NDEBUG;_LIB;WIN32;LOG4CXX_STATIC" StringPooling="true" RuntimeLibrary="0" *************** *** 196,200 **** InlineFunctionExpansion="1" AdditionalIncludeDirectories=".." ! PreprocessorDefinitions="NDEBUG;_LIB;WIN32;LOG4CXX_STATIC" StringPooling="true" RuntimeLibrary="2" --- 196,200 ---- InlineFunctionExpansion="1" AdditionalIncludeDirectories=".." ! PreprocessorDefinitions="BOOST_LIB_DIAGNOSTIC;NDEBUG;_LIB;WIN32;LOG4CXX_STATIC" StringPooling="true" RuntimeLibrary="2" Index: framewrk.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/xlsdk/framewrk.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** framewrk.cpp 19 May 2006 15:12:41 -0000 1.1 --- framewrk.cpp 25 May 2006 17:01:57 -0000 1.2 *************** *** 12,16 **** // GetTempMemory() // ! // Purpose: // Allocates temporary memory. Temporary memory // can only be freed in one chunk, by calling --- 12,16 ---- // GetTempMemory() // ! // Purpose: // Allocates temporary memory. Temporary memory // can only be freed in one chunk, by calling *************** *** 21,25 **** // int cBytes How many bytes to allocate // ! // Returns: // // LPSTR A pointer to the allocated memory, --- 21,25 ---- // int cBytes How many bytes to allocate // ! // Returns: // // LPSTR A pointer to the allocated memory, *************** *** 33,37 **** // // Algorithm: ! // // The memory allocation algorithm is extremely // simple: on each call, allocate the next cBytes --- 33,37 ---- // // Algorithm: ! // // The memory allocation algorithm is extremely // simple: on each call, allocate the next cBytes *************** *** 73,77 **** // FreeAllTempMemory() // ! // Purpose: // // Frees all temporary memory that has been allocated --- 73,77 ---- // FreeAllTempMemory() // ! // Purpose: // // Frees all temporary memory that has been allocated *************** *** 79,83 **** // Parameters: // ! // Returns: // // Comments: --- 79,83 ---- // Parameters: // ! // Returns: // // Comments: *************** *** 120,124 **** // TempNum() // ! // Purpose: // Creates a temporary numeric (IEEE floating point) XLOPER. // --- 120,124 ---- // TempNum() // ! // Purpose: // Creates a temporary numeric (IEEE floating point) XLOPER. // *************** *** 127,131 **** // double d The value // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 --- 127,131 ---- // double d The value // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 *************** *** 156,160 **** // TempStr() // ! // Purpose: // Creates a temporary string XLOPER // --- 156,160 ---- // TempStr() // ! // Purpose: // Creates a temporary string XLOPER // *************** *** 170,174 **** // characters. // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 --- 170,174 ---- // characters. // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 *************** *** 255,259 **** // TempBool() // ! // Purpose: // Creates a temporary logical (true/false) XLOPER. // --- 255,259 ---- // TempBool() // ! // Purpose: // Creates a temporary logical (true/false) XLOPER. // *************** *** 263,267 **** // Anything else - for a TRUE XLOPER // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 --- 263,267 ---- // Anything else - for a TRUE XLOPER // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 *************** *** 293,297 **** // TempInt() // ! // Purpose: // Creates a temporary integer XLOPER. // --- 293,297 ---- // TempInt() // ! // Purpose: // Creates a temporary integer XLOPER. // *************** *** 300,304 **** // short int i The integer // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 --- 300,304 ---- // short int i The integer // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 *************** *** 329,333 **** // TempErr() // ! // Purpose: // Creates a temporary error XLOPER. // --- 329,333 ---- // TempErr() // ! // Purpose: // Creates a temporary error XLOPER. // *************** *** 340,344 **** // of various error codes. // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 --- 340,344 ---- // of various error codes. // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 *************** *** 369,373 **** // TempActiveRef() // ! // Purpose: // Creates a temporary rectangular reference to the active // sheet. Remember that the active sheet is the sheet that --- 369,373 ---- // TempActiveRef() // ! // Purpose: // Creates a temporary rectangular reference to the active // sheet. Remember that the active sheet is the sheet that *************** *** 382,386 **** // BYTE colLast (0 based) The last column in the rectangle. // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 --- 382,386 ---- // BYTE colLast (0 based) The last column in the rectangle. // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 *************** *** 426,430 **** // TempActiveCell() // ! // Purpose: // Creates a temporary reference to a single cell on the active // sheet. Remember that the active sheet is the sheet that --- 426,430 ---- // TempActiveCell() // ! // Purpose: // Creates a temporary reference to a single cell on the active // sheet. Remember that the active sheet is the sheet that *************** *** 437,441 **** // BYTE col (0 based) The column of the cell. // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 --- 437,441 ---- // BYTE col (0 based) The column of the cell. // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 *************** *** 457,461 **** // TempActiveRow() // ! // Purpose: // Creates a temporary reference to an entire row on the active // sheet. Remember that the active sheet is the sheet that --- 457,461 ---- // TempActiveRow() // ! // Purpose: // Creates a temporary reference to an entire row on the active // sheet. Remember that the active sheet is the sheet that *************** *** 467,471 **** // WORD rw (0 based) The row. // ! // Returns: // // int 0 if they are equal --- 467,471 ---- // WORD rw (0 based) The row. // ! // Returns: // // int 0 if they are equal *************** *** 487,491 **** // TempActiveColumn() // ! // Purpose: // Creates a temporary reference to an entire column on the active // sheet. Remember that the active sheet is the sheet that --- 487,491 ---- // TempActiveColumn() // ! // Purpose: // Creates a temporary reference to an entire column on the active // sheet. Remember that the active sheet is the sheet that *************** *** 498,502 **** // LPSTR t Second string // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 --- 498,502 ---- // LPSTR t Second string // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 *************** *** 516,520 **** // TempMissing() // ! // Purpose: // This is used to simulate a missing argument when // calling Excel(). It creates a temporary --- 516,520 ---- // TempMissing() // ! // Purpose: // This is used to simulate a missing argument when // calling Excel(). It creates a temporary *************** *** 523,527 **** // Parameters: // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 --- 523,527 ---- // Parameters: // ! // Returns: // // LPXLOPER The temporary XLOPER, or 0 --- NEW FILE: auto_link.hpp --- /* Copyright (C) 2005 Eric Ehlers Copyright (C) 2004 Ferdinando Ametrano This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email qua...@li... The license is also available online at http://quantlib.org/html/license.html This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ #ifndef xlsdk_autolink_hpp #define xlsdk_autolink_hpp // select toolset: #if (_MSC_VER < 1200) # error "unsupported Microsoft compiler" #elif (_MSC_VER == 1200) # define XLSDK_LIB_TOOLSET "vc6" #elif (_MSC_VER == 1300) # define XLSDK_LIB_TOOLSET "vc7" #elif (_MSC_VER == 1310) # define XLSDK_LIB_TOOLSET "vc71" #elif (_MSC_VER == 1400) # define XLSDK_LIB_TOOLSET "vc80" #else # error "unknown Microsoft compiler" #endif /*** libraries to be linked ***/ // select thread opt: #ifdef _MT # define XLSDK_LIB_THREAD_OPT "-mt" #else # define XLSDK_LIB_THREAD_OPT #endif // select linkage opt: #ifdef _DLL # if defined(_DEBUG) # define XLSDK_LIB_RT_OPT "-gd" # else # define XLSDK_LIB_RT_OPT # endif #else # if defined(_DEBUG) # define XLSDK_LIB_RT_OPT "-sgd" # else # define XLSDK_LIB_RT_OPT "-s" # endif #endif #define XLSDK_LIB_NAME "xlsdk-" XLSDK_LIB_TOOLSET XLSDK_LIB_THREAD_OPT XLSDK_LIB_RT_OPT ".lib" #pragma comment(lib, XLSDK_LIB_NAME) #ifdef BOOST_LIB_DIAGNOSTIC # pragma message("Linking to lib file: " XLSDK_LIB_NAME) #endif #endif |
From: Ferdinando A. <na...@us...> - 2006-05-25 17:02:19
|
Update of /cvsroot/objecthandler/ObjectHandler/Examples/C++ In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12155/Examples/C++ Modified Files: example.cpp Log Message: auto_linking Index: example.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/Examples/C++/example.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** example.cpp 25 May 2006 10:45:34 -0000 1.2 --- example.cpp 25 May 2006 17:01:56 -0000 1.3 *************** *** 22,28 **** #ifdef BOOST_MSVC # define BOOST_LIB_DIAGNOSTIC ! # define BOOST_LIB_NAME boost_unit_test_framework ! # include <log4cxx/autolink.hpp> ! # undef BOOST_LIB_NAME # undef BOOST_LIB_DIAGNOSTIC #endif --- 22,26 ---- #ifdef BOOST_MSVC # define BOOST_LIB_DIAGNOSTIC ! # include <oh/auto_link.hpp> # undef BOOST_LIB_DIAGNOSTIC #endif *************** *** 49,53 **** // construct some objects and store them in the object handler ObjHandler::obj_ptr accountObject1(new AccountObject( ! 123456789, "savings")); accountObject1->setProperties( --- 47,51 ---- // construct some objects and store them in the object handler ObjHandler::obj_ptr accountObject1(new AccountObject( ! 123456789, "savings")); accountObject1->setProperties( *************** *** 57,61 **** ObjHandler::obj_ptr accountObject2(new AccountObject( ! 987654321, "current")); accountObject2->setProperties( --- 55,59 ---- ObjHandler::obj_ptr accountObject2(new AccountObject( ! 987654321, "current")); accountObject2->setProperties( |
From: Ferdinando A. <na...@us...> - 2006-05-25 17:02:16
|
Update of /cvsroot/objecthandler/ObjectHandler/oh In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12155/oh Modified Files: logger.cpp Added Files: auto_link.hpp Removed Files: autolink.hpp Log Message: auto_linking --- autolink.hpp DELETED --- Index: logger.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/logger.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** logger.cpp 25 May 2006 11:37:26 -0000 1.3 --- logger.cpp 25 May 2006 17:01:57 -0000 1.4 *************** *** 28,32 **** #ifdef BOOST_MSVC # define BOOST_LIB_DIAGNOSTIC ! # include <log4cxx/autolink.hpp> # undef BOOST_LIB_DIAGNOSTIC #endif --- 28,32 ---- #ifdef BOOST_MSVC # define BOOST_LIB_DIAGNOSTIC ! # include <log4cxx/auto_link.hpp> # undef BOOST_LIB_DIAGNOSTIC #endif --- NEW FILE: auto_link.hpp --- /* Copyright (C) 2005 Eric Ehlers Copyright (C) 2004 Ferdinando Ametrano This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email qua...@li... The license is also available online at http://quantlib.org/html/license.html This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ #ifndef oh_autolink_hpp #define oh_autolink_hpp // select toolset: #if (_MSC_VER < 1200) # error "unsupported Microsoft compiler" #elif (_MSC_VER == 1200) # define OBJHANDLER_LIB_TOOLSET "vc6" #elif (_MSC_VER == 1300) # define OBJHANDLER_LIB_TOOLSET "vc7" #elif (_MSC_VER == 1310) # define OBJHANDLER_LIB_TOOLSET "vc71" #elif (_MSC_VER == 1400) # define OBJHANDLER_LIB_TOOLSET "vc80" #else # error "unknown Microsoft compiler" #endif /*** libraries to be linked ***/ // select thread opt: #ifdef _MT # define OBJHANDLER_LIB_THREAD_OPT "-mt" #else # define OBJHANDLER_LIB_THREAD_OPT #endif // select linkage opt: #ifdef _DLL # if defined(_DEBUG) # define OBJHANDLER_LIB_RT_OPT "-gd" # else # define OBJHANDLER_LIB_RT_OPT # endif #else # if defined(_DEBUG) # define OBJHANDLER_LIB_RT_OPT "-sgd" # else # define OBJHANDLER_LIB_RT_OPT "-s" # endif #endif // select OH lib #if defined(XLL_STATIC) # define OBJHANDLER_LIB_TYPE "-xllib" #elif defined(XLL_IMPORTS) # define OBJHANDLER_LIB_TYPE "-xll" #else # define OBJHANDLER_LIB_TYPE "" #endif #define OBJHANDLER_LIB_NAME "ObjectHandler" OBJHANDLER_LIB_TYPE "-" OBJHANDLER_LIB_TOOLSET OBJHANDLER_LIB_THREAD_OPT OBJHANDLER_LIB_RT_OPT "-" OBJHANDLER_LIB_VERSION ".lib" #pragma comment(lib, OBJHANDLER_LIB_NAME) #ifdef BOOST_LIB_DIAGNOSTIC # pragma message("Linking to lib file: " OBJHANDLER_LIB_NAME) #endif #endif |
From: Ferdinando A. <na...@us...> - 2006-05-25 17:02:16
|
Update of /cvsroot/objecthandler/ObjectHandler In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12155 Modified Files: ObjectHandler_vc8.sln Log Message: auto_linking Index: ObjectHandler_vc8.sln =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ObjectHandler_vc8.sln,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ObjectHandler_vc8.sln 19 May 2006 15:12:41 -0000 1.1 --- ObjectHandler_vc8.sln 25 May 2006 17:01:56 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExampleXllDynamic1", "Examples\xl\ExampleXllDynamic1_vc8.vcproj", "{CFC78C89-EFD2-400A-8860-40320E6FCA60}" ProjectSection(ProjectDependencies) = postProject + {4BD77A1E-AAE9-47A4-81FE-2308E5A460AF} = {4BD77A1E-AAE9-47A4-81FE-2308E5A460AF} {04D7369F-47BC-46B0-A374-41635A9656D8} = {04D7369F-47BC-46B0-A374-41635A9656D8} EndProjectSection *************** *** 14,17 **** --- 15,19 ---- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExampleXllDynamic2", "Examples\xl\ExampleXllDynamic2_vc8.vcproj", "{F89760C1-CD0C-4138-A6A7-A8528A1B0D6F}" ProjectSection(ProjectDependencies) = postProject + {4BD77A1E-AAE9-47A4-81FE-2308E5A460AF} = {4BD77A1E-AAE9-47A4-81FE-2308E5A460AF} {04D7369F-47BC-46B0-A374-41635A9656D8} = {04D7369F-47BC-46B0-A374-41635A9656D8} EndProjectSection *************** *** 25,36 **** EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ohxll", "ohxl\ohxll\ohxll_vc8.vcproj", "{04D7369F-47BC-46B0-A374-41635A9656D8}" - ProjectSection(ProjectDependencies) = postProject - {4BD77A1E-AAE9-47A4-81FE-2308E5A460AF} = {4BD77A1E-AAE9-47A4-81FE-2308E5A460AF} - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ohxllib", "ohxl\ohxllib\ohxllib_vc8.vcproj", "{66021664-4359-442C-ACC7-7C82F51C9D5A}" - ProjectSection(ProjectDependencies) = postProject - {4BD77A1E-AAE9-47A4-81FE-2308E5A460AF} = {4BD77A1E-AAE9-47A4-81FE-2308E5A460AF} - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xlsdk", "xlsdk\xlsdk_vc8.vcproj", "{4BD77A1E-AAE9-47A4-81FE-2308E5A460AF}" --- 27,32 ---- |
From: Ferdinando A. <na...@us...> - 2006-05-25 17:02:16
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12155/ohxl Modified Files: objecthandlerxl.cpp Log Message: auto_linking Index: objecthandlerxl.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/objecthandlerxl.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** objecthandlerxl.cpp 19 May 2006 15:12:41 -0000 1.1 --- objecthandlerxl.cpp 25 May 2006 17:01:57 -0000 1.2 *************** *** 20,23 **** --- 20,31 ---- #include <ohxl/instancenamexl.hpp> #include <ohxl/conversions.hpp> + /* Use BOOST_MSVC instead of _MSC_VER since some other vendors (Metrowerks, + for example) also #define _MSC_VER + */ + #ifdef BOOST_MSVC + # define BOOST_LIB_DIAGNOSTIC + # include <xlsdk/auto_link.hpp> + # undef BOOST_LIB_DIAGNOSTIC + #endif #include <iostream> #include <iomanip> *************** *** 28,32 **** namespace ObjHandler { ! std::string ObjectHandlerXL::storeObject(const std::string &instanceName, const obj_ptr &object) { object->setInstanceName(boost::shared_ptr < Object::InstanceName > (new InstanceNameXL(instanceName))); --- 36,40 ---- namespace ObjHandler { ! std::string ObjectHandlerXL::storeObject(const std::string &instanceName, const obj_ptr &object) { object->setInstanceName(boost::shared_ptr < Object::InstanceName > (new InstanceNameXL(instanceName))); *************** *** 61,65 **** } ! bool ObjectHandlerXL::nameIsFull(const std::string &name) const { static const boost::regex NAME_REGEX(".*~_[\\da-f]{5}"); return regex_match(name, NAME_REGEX); --- 69,73 ---- } ! bool ObjectHandlerXL::nameIsFull(const std::string &name) const { static const boost::regex NAME_REGEX(".*~_[\\da-f]{5}"); return regex_match(name, NAME_REGEX); |
From: Ferdinando A. <na...@us...> - 2006-05-25 17:02:13
|
Update of /cvsroot/objecthandler/ObjectHandler/Examples/xl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12155/Examples/xl Modified Files: ExampleXllStatic_vc8.vcproj addindynamic1.cpp addindynamic2.cpp addinstatic.cpp Log Message: auto_linking Index: addindynamic1.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/Examples/xl/addindynamic1.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** addindynamic1.cpp 19 May 2006 15:12:41 -0000 1.1 --- addindynamic1.cpp 25 May 2006 17:01:56 -0000 1.2 *************** *** 21,24 **** --- 21,33 ---- #include <ohxl/conversions.hpp> #include <ohxl/functioncall.hpp> + /* Use BOOST_MSVC instead of _MSC_VER since some other vendors (Metrowerks, + for example) also #define _MSC_VER + */ + #ifdef BOOST_MSVC + # define BOOST_LIB_DIAGNOSTIC + # include <oh/auto_link.hpp> + # include <xlsdk/auto_link.hpp> + # undef BOOST_LIB_DIAGNOSTIC + #endif #include <sstream> *************** *** 59,63 **** DLLEXPORT char* addin1CreateAccount( ! char *instanceName, long *accountNumber, char *accountType) { --- 68,72 ---- DLLEXPORT char* addin1CreateAccount( ! char *instanceName, long *accountNumber, char *accountType) { *************** *** 67,71 **** ObjHandler::obj_ptr objectPointer(new AccountObject( ! *accountNumber, accountType)); objectPointer->setProperties( --- 76,80 ---- ObjHandler::obj_ptr objectPointer(new AccountObject( ! *accountNumber, accountType)); objectPointer->setProperties( Index: ExampleXllStatic_vc8.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/Examples/xl/ExampleXllStatic_vc8.vcproj,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ExampleXllStatic_vc8.vcproj 25 May 2006 10:45:35 -0000 1.4 --- ExampleXllStatic_vc8.vcproj 25 May 2006 17:01:56 -0000 1.5 *************** *** 49,53 **** Optimization="0" AdditionalIncludeDirectories=".,..\..,$(LOG4CXX_DIR)\include" ! PreprocessorDefinitions="XLLSTATIC" MinimalRebuild="true" BasicRuntimeChecks="3" --- 49,53 ---- Optimization="0" AdditionalIncludeDirectories=".,..\..,$(LOG4CXX_DIR)\include" ! PreprocessorDefinitions="XLL_STATIC" MinimalRebuild="true" BasicRuntimeChecks="3" *************** *** 148,152 **** InlineFunctionExpansion="1" AdditionalIncludeDirectories=".,..\..,$(LOG4CXX_DIR)\include" ! PreprocessorDefinitions="XLLSTATIC" StringPooling="true" RuntimeLibrary="0" --- 148,152 ---- InlineFunctionExpansion="1" AdditionalIncludeDirectories=".,..\..,$(LOG4CXX_DIR)\include" ! PreprocessorDefinitions="XLL_STATIC" StringPooling="true" RuntimeLibrary="0" *************** *** 245,249 **** InlineFunctionExpansion="1" AdditionalIncludeDirectories=".,..\..,$(LOG4CXX_DIR)\include" ! PreprocessorDefinitions="XLLSTATIC" StringPooling="true" RuntimeLibrary="2" --- 245,249 ---- InlineFunctionExpansion="1" AdditionalIncludeDirectories=".,..\..,$(LOG4CXX_DIR)\include" ! PreprocessorDefinitions="XLL_STATIC" StringPooling="true" RuntimeLibrary="2" *************** *** 341,345 **** Optimization="0" AdditionalIncludeDirectories=".,..\..,$(LOG4CXX_DIR)\include" ! PreprocessorDefinitions="XLLSTATIC" MinimalRebuild="true" BasicRuntimeChecks="3" --- 341,345 ---- Optimization="0" AdditionalIncludeDirectories=".,..\..,$(LOG4CXX_DIR)\include" ! PreprocessorDefinitions="XLL_STATIC" MinimalRebuild="true" BasicRuntimeChecks="3" Index: addinstatic.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/Examples/xl/addinstatic.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** addinstatic.cpp 25 May 2006 10:45:35 -0000 1.2 --- addinstatic.cpp 25 May 2006 17:01:56 -0000 1.3 *************** *** 17,21 **** #include <account.hpp> ! #include <oh/objhandler.hpp> #include <ohxl/conversions.hpp> #include <ohxl/register.hpp> --- 17,21 ---- #include <account.hpp> ! #include <xlsdk/xlsdk.hpp> #include <ohxl/conversions.hpp> #include <ohxl/register.hpp> *************** *** 23,27 **** #include <ohxl/instancenamexl.hpp> #include <ohxl/functioncall.hpp> ! #include <xlsdk/xlsdk.hpp> /* Use BOOST_MSVC instead of _MSC_VER since some other vendors (Metrowerks, for example) also #define _MSC_VER --- 23,27 ---- #include <ohxl/instancenamexl.hpp> #include <ohxl/functioncall.hpp> ! #include <oh/objhandler.hpp> /* Use BOOST_MSVC instead of _MSC_VER since some other vendors (Metrowerks, for example) also #define _MSC_VER *************** *** 29,33 **** #ifdef BOOST_MSVC # define BOOST_LIB_DIAGNOSTIC ! # include <log4cxx/autolink.hpp> # undef BOOST_LIB_DIAGNOSTIC #endif --- 29,33 ---- #ifdef BOOST_MSVC # define BOOST_LIB_DIAGNOSTIC ! # include <oh/auto_link.hpp> # undef BOOST_LIB_DIAGNOSTIC #endif *************** *** 80,84 **** DLLEXPORT char *createAccount( ! char *instanceName, long *accountNumber, char *accountType) { --- 80,84 ---- DLLEXPORT char *createAccount( ! char *instanceName, long *accountNumber, char *accountType) { *************** *** 88,92 **** ObjHandler::obj_ptr objectPointer(new AccountObject( ! *accountNumber, accountType)); objectPointer->setProperties( --- 88,92 ---- ObjHandler::obj_ptr objectPointer(new AccountObject( ! *accountNumber, accountType)); objectPointer->setProperties( Index: addindynamic2.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/Examples/xl/addindynamic2.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** addindynamic2.cpp 19 May 2006 15:12:41 -0000 1.1 --- addindynamic2.cpp 25 May 2006 17:01:56 -0000 1.2 *************** *** 20,23 **** --- 20,32 ---- #include <xlsdk/xlsdk.hpp> #include <ohxl/conversions.hpp> + /* Use BOOST_MSVC instead of _MSC_VER since some other vendors (Metrowerks, + for example) also #define _MSC_VER + */ + #ifdef BOOST_MSVC + # define BOOST_LIB_DIAGNOSTIC + # include <oh/auto_link.hpp> + # include <xlsdk/auto_link.hpp> + # undef BOOST_LIB_DIAGNOSTIC + #endif #include <sstream> |
From: Ferdinando A. <na...@us...> - 2006-05-25 17:02:13
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/ohxllib In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12155/ohxl/ohxllib Modified Files: ohxllib_vc8.vcproj Log Message: auto_linking Index: ohxllib_vc8.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/ohxllib/ohxllib_vc8.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ohxllib_vc8.vcproj 24 May 2006 09:42:09 -0000 1.2 --- ohxllib_vc8.vcproj 25 May 2006 17:01:57 -0000 1.3 *************** *** 2,6 **** <VisualStudioProject ProjectType="Visual C++" ! Version="8,00" Name="ohxllib" ProjectGUID="{66021664-4359-442C-ACC7-7C82F51C9D5A}" --- 2,6 ---- <VisualStudioProject ProjectType="Visual C++" ! Version="8.00" Name="ohxllib" ProjectGUID="{66021664-4359-442C-ACC7-7C82F51C9D5A}" *************** *** 394,426 **** > <File ! RelativePath="..\functioncall.cpp" > </File> <File ! RelativePath="..\instancenamexl.cpp" > </File> <File ! RelativePath="..\functioncall.hpp" > </File> <File ! RelativePath="..\instancenamexl.hpp" > </File> <File ! RelativePath="..\conversions.cpp" > </File> <File ! RelativePath="..\conversions.hpp" > </File> <File ! RelativePath="..\export.hpp" > </File> <File ! RelativePath="..\functions.cpp" > </File> --- 394,426 ---- > <File ! RelativePath="..\conversions.cpp" > </File> <File ! RelativePath="..\conversions.hpp" > </File> <File ! RelativePath="..\export.hpp" > </File> <File ! RelativePath="..\functioncall.cpp" > </File> <File ! RelativePath="..\functioncall.hpp" > </File> <File ! RelativePath="..\functions.cpp" > </File> <File ! RelativePath="..\instancenamexl.cpp" > </File> <File ! RelativePath="..\instancenamexl.hpp" > </File> |
From: Ferdinando A. <na...@us...> - 2006-05-25 17:02:12
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/ohxll In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12155/ohxl/ohxll Modified Files: addin.cpp Log Message: auto_linking Index: addin.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/ohxll/addin.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** addin.cpp 25 May 2006 10:45:36 -0000 1.2 --- addin.cpp 25 May 2006 17:01:57 -0000 1.3 *************** *** 21,34 **** #include <ohxl/export.hpp> #include <ohxl/conversions.hpp> - /* Use BOOST_MSVC instead of _MSC_VER since some other vendors (Metrowerks, - for example) also #define _MSC_VER - */ - #ifdef BOOST_MSVC - # define BOOST_LIB_DIAGNOSTIC - # define BOOST_LIB_NAME boost_unit_test_framework - # include <log4cxx/autolink.hpp> - # undef BOOST_LIB_NAME - # undef BOOST_LIB_DIAGNOSTIC - #endif #include <sstream> --- 21,24 ---- *************** *** 96,100 **** // return of a #VALUE! error. if (1 == xlReturn.val.w) { ! ObjHandler::scalarToXloper(xlLongName, std::string("ObjectHandler 0.1.4")); } else { --- 86,90 ---- // return of a #VALUE! error. if (1 == xlReturn.val.w) { ! ObjHandler::scalarToXloper(xlLongName, std::string("ObjectHandler 0.1.4")); } else { |
From: Eric E. <eri...@us...> - 2006-05-25 16:59:54
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11422/ohxl Modified Files: conversions.cpp conversions.hpp functioncall.cpp instancenamexl.cpp Log Message: remove redundant string conversions Index: functioncall.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/functioncall.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functioncall.cpp 19 May 2006 15:12:41 -0000 1.1 --- functioncall.cpp 25 May 2006 16:59:51 -0000 1.2 *************** *** 68,72 **** std::ostringstream err; err << "FunctionCall::getAddressString(): " << e.what(); ! throw Exception(err.str().c_str()); } } --- 68,72 ---- std::ostringstream err; err << "FunctionCall::getAddressString(): " << e.what(); ! throw Exception(err.str()); } } *************** *** 112,116 **** std::ostringstream err; err << "FunctionCall::clearCell(): " << e.what(); ! throw Exception(err.str().c_str()); } --- 112,116 ---- std::ostringstream err; err << "FunctionCall::clearCell(): " << e.what(); ! throw Exception(err.str()); } Index: conversions.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/conversions.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** conversions.hpp 23 May 2006 12:08:48 -0000 1.2 --- conversions.hpp 25 May 2006 16:59:51 -0000 1.3 *************** *** 134,138 **** std::ostringstream msg; msg << "operToVector: " << e.what(); ! throw Exception(msg.str().c_str()); } } --- 134,138 ---- std::ostringstream msg; msg << "operToVector: " << e.what(); ! throw Exception(msg.str()); } } *************** *** 190,194 **** std::ostringstream msg; msg << "operToMatrix: " << e.what(); ! throw Exception(msg.str().c_str()); } } --- 190,194 ---- std::ostringstream msg; msg << "operToMatrix: " << e.what(); ! throw Exception(msg.str()); } } *************** *** 244,248 **** std::ostringstream msg; msg << "operToVectorLibrary: " << e.what(); ! throw Exception(msg.str().c_str()); } } --- 244,248 ---- std::ostringstream msg; msg << "operToVectorLibrary: " << e.what(); ! throw Exception(msg.str()); } } *************** *** 298,302 **** std::ostringstream msg; msg << "operToVector: " << e.what(); ! throw Exception(msg.str().c_str()); } } --- 298,302 ---- std::ostringstream msg; msg << "operToVector: " << e.what(); ! throw Exception(msg.str()); } } Index: conversions.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/conversions.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** conversions.cpp 19 May 2006 15:12:41 -0000 1.1 --- conversions.cpp 25 May 2006 16:59:51 -0000 1.2 *************** *** 185,189 **** std::ostringstream msg; msg << "operToScalar: " << e.what(); ! throw Exception(msg.str().c_str()); } } --- 185,189 ---- std::ostringstream msg; msg << "operToScalar: " << e.what(); ! throw Exception(msg.str()); } } *************** *** 206,210 **** std::ostringstream msg; msg << "operToScalar: " << e.what(); ! throw Exception(msg.str().c_str()); } } --- 206,210 ---- std::ostringstream msg; msg << "operToScalar: " << e.what(); ! throw Exception(msg.str()); } } *************** *** 227,231 **** std::ostringstream msg; msg << "operToScalar: " << e.what(); ! throw Exception(msg.str().c_str()); } } --- 227,231 ---- std::ostringstream msg; msg << "operToScalar: " << e.what(); ! throw Exception(msg.str()); } } *************** *** 263,267 **** std::ostringstream msg; msg << "operToScalar: " << e.what(); ! throw Exception(msg.str().c_str()); } } --- 263,267 ---- std::ostringstream msg; msg << "operToScalar: " << e.what(); ! throw Exception(msg.str()); } } Index: instancenamexl.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/instancenamexl.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** instancenamexl.cpp 19 May 2006 15:12:41 -0000 1.1 --- instancenamexl.cpp 25 May 2006 16:59:51 -0000 1.2 *************** *** 49,53 **** err << "object instance name '" << stubName_ << "' is invalid " "because it contains the delimiter character '" << KEY_DELIMITER << "'"; ! throw ObjHandler::Exception(err.str().c_str()); } --- 49,53 ---- err << "object instance name '" << stubName_ << "' is invalid " "because it contains the delimiter character '" << KEY_DELIMITER << "'"; ! throw ObjHandler::Exception(err.str()); } *************** *** 100,104 **** std::ostringstream err; err << "ObjectHandlerXL::nameIsValid: " << e.what(); ! throw Exception(err.str().c_str()); } --- 100,104 ---- std::ostringstream err; err << "ObjectHandlerXL::nameIsValid: " << e.what(); ! throw Exception(err.str()); } |
From: Eric E. <eri...@us...> - 2006-05-25 16:04:08
|
Update of /cvsroot/objecthandler/log4cxx-0.9.7/msvc/static In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23823/msvc/static Added Files: .cvsignore Log Message: --- NEW FILE: .cvsignore --- *.user vc80 Debug |
From: Eric E. <eri...@us...> - 2006-05-25 16:04:03
|
Update of /cvsroot/objecthandler/log4cxx-0.9.7/msvc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23823/msvc Added Files: .cvsignore Log Message: --- NEW FILE: .cvsignore --- log4cxx_vc8.suo lib log4cxx_vc8.ncb |
From: Eric E. <eri...@us...> - 2006-05-25 16:02:19
|
Update of /cvsroot/objecthandler/log4cxx-0.9.7/msvc/static In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23303/msvc/static Modified Files: static_vc8.vcproj Log Message: silence warnings Index: static_vc8.vcproj =================================================================== RCS file: /cvsroot/objecthandler/log4cxx-0.9.7/msvc/static/static_vc8.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** static_vc8.vcproj 25 May 2006 11:41:33 -0000 1.1 --- static_vc8.vcproj 25 May 2006 16:02:15 -0000 1.2 *************** *** 120,124 **** Optimization="0" AdditionalIncludeDirectories="../../include" ! PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LOG4CXX;LOG4CXX_STATIC" BasicRuntimeChecks="3" RuntimeLibrary="1" --- 120,124 ---- Optimization="0" AdditionalIncludeDirectories="../../include" ! PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LOG4CXX;LOG4CXX_STATIC;_CRT_SECURE_NO_DEPRECATE" BasicRuntimeChecks="3" RuntimeLibrary="1" *************** *** 269,273 **** InlineFunctionExpansion="1" AdditionalIncludeDirectories="../../include" ! PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LOG4CXX;LOG4CXX_STATIC" StringPooling="true" RuntimeLibrary="0" --- 269,273 ---- InlineFunctionExpansion="1" AdditionalIncludeDirectories="../../include" ! PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LOG4CXX;LOG4CXX_STATIC;_CRT_SECURE_NO_DEPRECATE" StringPooling="true" RuntimeLibrary="0" *************** *** 345,349 **** InlineFunctionExpansion="1" AdditionalIncludeDirectories="../../include" ! PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LOG4CXX;LOG4CXX_STATIC" StringPooling="true" RuntimeLibrary="2" --- 345,349 ---- InlineFunctionExpansion="1" AdditionalIncludeDirectories="../../include" ! PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LOG4CXX;LOG4CXX_STATIC;_CRT_SECURE_NO_DEPRECATE" StringPooling="true" RuntimeLibrary="2" *************** *** 420,424 **** Optimization="0" AdditionalIncludeDirectories="../../include" ! PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LOG4CXX;LOG4CXX_STATIC" BasicRuntimeChecks="3" RuntimeLibrary="3" --- 420,424 ---- Optimization="0" AdditionalIncludeDirectories="../../include" ! PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LOG4CXX;LOG4CXX_STATIC;_CRT_SECURE_NO_DEPRECATE" BasicRuntimeChecks="3" RuntimeLibrary="3" |
From: Eric E. <eri...@us...> - 2006-05-25 16:02:00
|
Update of /cvsroot/objecthandler/log4cxx-0.9.7/msvc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22939/msvc Modified Files: log4cxx.sln Log Message: remove simplesocketserver Index: log4cxx.sln =================================================================== RCS file: /cvsroot/objecthandler/log4cxx-0.9.7/msvc/log4cxx.sln,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** log4cxx.sln 25 May 2006 11:41:32 -0000 1.1 --- log4cxx.sln 25 May 2006 16:01:29 -0000 1.2 *************** *** 1,8 **** Microsoft Visual Studio Solution File, Format Version 8.00 - Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simplesocketserver", "simplesocketserver\simplesocketserver.vcproj", "{A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}" - ProjectSection(ProjectDependencies) = postProject - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829} = {A4E44A07-5436-4BE3-BAEA-C7994AD3D829} - EndProjectSection - EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "static", "static\static.vcproj", "{495708AC-96C6-41E5-AD66-4AFD16C27A21}" ProjectSection(ProjectDependencies) = postProject --- 1,3 ---- *************** *** 21,56 **** EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Debug.ActiveCfg = Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Debug.Build.0 = Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Debug CRDLL.ActiveCfg = Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Debug CRDLL.Build.0 = Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Debug Single Thread.ActiveCfg = Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Debug Single Thread.Build.0 = Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Release.ActiveCfg = Release|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Release.Build.0 = Release|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Release CRTDLL.ActiveCfg = Release|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Release CRTDLL.Build.0 = Release|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Release Single Thread.ActiveCfg = Release|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Release Single Thread.Build.0 = Release|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Unicode Debug.ActiveCfg = Unicode Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Unicode Debug.Build.0 = Unicode Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Unicode Release.ActiveCfg = Unicode Release|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Unicode Release.Build.0 = Unicode Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Debug.ActiveCfg = Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Debug.Build.0 = Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Debug CRDLL.ActiveCfg = Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Debug CRDLL.Build.0 = Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Debug Single Thread.ActiveCfg = Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Debug Single Thread.Build.0 = Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Release.ActiveCfg = Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Release.Build.0 = Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Release CRTDLL.ActiveCfg = Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Release CRTDLL.Build.0 = Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Release Single Thread.ActiveCfg = Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Release Single Thread.Build.0 = Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Unicode Debug.ActiveCfg = Unicode Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Unicode Debug.Build.0 = Unicode Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Unicode Release.ActiveCfg = Unicode Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Unicode Release.Build.0 = Unicode Release|Win32 {495708AC-96C6-41E5-AD66-4AFD16C27A21}.Debug.ActiveCfg = Debug|Win32 {495708AC-96C6-41E5-AD66-4AFD16C27A21}.Debug.Build.0 = Debug|Win32 --- 16,19 ---- |
From: Eric E. <eri...@us...> - 2006-05-25 16:02:00
|
Update of /cvsroot/objecthandler/log4cxx-0.9.7/msvc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22977/msvc Modified Files: log4cxx_vc8.sln Log Message: remove simplesocketserver Index: log4cxx_vc8.sln =================================================================== RCS file: /cvsroot/objecthandler/log4cxx-0.9.7/msvc/log4cxx_vc8.sln,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** log4cxx_vc8.sln 25 May 2006 11:41:32 -0000 1.1 --- log4cxx_vc8.sln 25 May 2006 16:01:55 -0000 1.2 *************** *** 1,9 **** Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 - Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simplesocketserver", "simplesocketserver\simplesocketserver_vc8.vcproj", "{A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}" - ProjectSection(ProjectDependencies) = postProject - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829} = {A4E44A07-5436-4BE3-BAEA-C7994AD3D829} - EndProjectSection - EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "static", "static\static_vc8.vcproj", "{495708AC-96C6-41E5-AD66-4AFD16C27A21}" EndProject --- 1,4 ---- *************** *** 18,45 **** EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Debug CRTDLL|Win32.ActiveCfg = Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Debug CRTDLL|Win32.Build.0 = Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Debug|Win32.ActiveCfg = Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Debug|Win32.Build.0 = Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Release CRTDLL|Win32.ActiveCfg = Release|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Release CRTDLL|Win32.Build.0 = Release|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Release|Win32.ActiveCfg = Release|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Release|Win32.Build.0 = Release|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32 - {A4E44A07-5436-4BE3-BAEA-C7994AD3D829}.Unicode Release|Win32.Build.0 = Unicode Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Debug CRTDLL|Win32.ActiveCfg = Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Debug CRTDLL|Win32.Build.0 = Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Debug|Win32.ActiveCfg = Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Debug|Win32.Build.0 = Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Release CRTDLL|Win32.ActiveCfg = Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Release CRTDLL|Win32.Build.0 = Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Release|Win32.ActiveCfg = Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Release|Win32.Build.0 = Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32 - {A21EE49A-CE32-4A4B-9B8E-EA2444DCC494}.Unicode Release|Win32.Build.0 = Unicode Release|Win32 {495708AC-96C6-41E5-AD66-4AFD16C27A21}.Debug CRTDLL|Win32.ActiveCfg = Debug CRTDLL|Win32 {495708AC-96C6-41E5-AD66-4AFD16C27A21}.Debug CRTDLL|Win32.Build.0 = Debug CRTDLL|Win32 --- 13,16 ---- |
From: Eric E. <eri...@us...> - 2006-05-25 16:01:13
|
Update of /cvsroot/objecthandler/log4cxx-0.9.7/include/log4cxx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22906/include/log4cxx Modified Files: config_msvc.h Log Message: silence warnings Index: config_msvc.h =================================================================== RCS file: /cvsroot/objecthandler/log4cxx-0.9.7/include/log4cxx/config_msvc.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** config_msvc.h 25 May 2006 11:41:29 -0000 1.1 --- config_msvc.h 25 May 2006 16:01:05 -0000 1.2 *************** *** 29,33 **** #ifdef WIN32 ! #pragma warning(disable : 4250 4251 4786 4290) #endif --- 29,33 ---- #ifdef WIN32 ! #pragma warning(disable : 4250 4251 4786 4290 4996) #endif |
Update of /cvsroot/objecthandler/log4cxx-0.9.7/tests/input/xml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25784/tests/input/xml Added Files: DOMTestCase1.xml Makefile.am customLevel1.xml customLevel2.xml customLevel3.xml customLevel4.xml customLogger1.xml customLogger2.xml defaultInit.xml fallback1.xml filters.LevelMatchFilter.test4.0.xml filters.LevelMatchFilter.test4.1.xml filters.LevelMatchFilter.test4.2.xml filters.LevelMatchFilter.test4.3.xml filters.LevelMatchFilter.test4.4.xml log4j.dtd Log Message: --- NEW FILE: fallback1.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="PRIMARY" class="org.apache.log4j.FileAppender"> <errorHandler class="org.apache.log4j.varia.FallbackErrorHandler"> <root-ref/> <appender-ref ref="FALLBACK" /> </errorHandler> <param name="File" value="/xyz/x.log" /> <param name="Append" value="false" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p %c{2} - %m%n"/> </layout> </appender> <appender name="FALLBACK" class="org.apache.log4j.FileAppender"> <param name="File" value="output/temp" /> <param name="Append" value="false" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="FALLBACK - %c - %m%n"/> </layout> </appender> <root> <priority value ="debug" /> <appender-ref ref="PRIMARY" /> </root> </log4j:configuration> --- NEW FILE: customLevel2.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' debug="false"> <appender name="TEMP" class="org.apache.log4j.FileAppender"> <param name="Append" value="false" /> <param name="File" value="output/temp" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p %c{2} - %m\n"/> </layout> <filter class="org.apache.log4j.varia.LevelMatchFilter"> <param name="LevelToMatch" value="TRACE#org.apache.log4j.xml.XLevel" /> <param name="AcceptOnMatch" value="true" /> </filter> </appender> <root> <level value="TRACE" class="org.apache.log4j.xml.XLevel"/> <appender-ref ref="TEMP" /> </root> </log4j:configuration> --- NEW FILE: customLevel3.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' debug="false"> <appender name="TEMP" class="org.apache.log4j.FileAppender"> <param name="Append" value="false" /> <param name="File" value="output/temp" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p %c{2} - %m\n"/> </layout> <filter class="org.apache.log4j.varia.LevelMatchFilter"> <param name="LevelToMatch" value="TRACE#org.apache.log4j.xml.XLevel" /> <param name="AcceptOnMatch" value="true" /> </filter> <filter class="org.apache.log4j.varia.DenyAllFilter"/> </appender> <root> <level value="TRACE" class="org.apache.log4j.xml.XLevel"/> <appender-ref ref="TEMP" /> </root> </log4j:configuration> --- NEW FILE: filters.LevelMatchFilter.test4.1.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="A1" class="org.apache.log4j.FileAppender"> <param name="File" value="output/filters.LevelMatchFilter.test4.txt" /> <param name="Append" value="true" /> <layout class="org.apache.log4j.SimpleLayout"/> <filter class="org.apache.log4j.filters.LevelMatchFilter"> <param name="MatchReturnValue" value="accept"/> <param name="NoMatchReturnValue" value="deny"/> <param name="LevelToMatch" value="info"/> </filter> </appender> <root> <priority value ="debug" /> <appender-ref ref="A1" /> </root> </log4j:configuration> --- NEW FILE: customLogger2.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' debug="false"> <appender name="TEMP" class="org.apache.log4j.FileAppender"> <param name="Append" value="false" /> <param name="File" value="output/temp" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p %c{2} - %m%n"/> </layout> <filter class="org.apache.log4j.varia.LevelMatchFilter"> <param name="LevelToMatch" value="TRACE#org.apache.log4j.xml.XLevel" /> <param name="AcceptOnMatch" value="true" /> </filter> <filter class="org.apache.log4j.varia.DenyAllFilter"/> </appender> <root> <level value ="TRACE" class="org.apache.log4j.xml.XLevel"/> <appender-ref ref="TEMP" /> </root> </log4j:configuration> --- NEW FILE: customLevel1.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'> <appender name="TEMP" class="org.apache.log4j.FileAppender"> <param name="Append" value="false" /> <param name="File" value="output/temp" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p %c{2} - %m\n"/> </layout> </appender> <root> <level value="TRACE" class="org.apache.log4j.xml.XLevel"/> <appender-ref ref="TEMP" /> </root> </log4j:configuration> --- NEW FILE: filters.LevelMatchFilter.test4.2.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="A1" class="org.apache.log4j.FileAppender"> <param name="File" value="output/filters.LevelMatchFilter.test4.txt" /> <param name="Append" value="true" /> <layout class="org.apache.log4j.SimpleLayout"/> <filter class="org.apache.log4j.filters.LevelMatchFilter"> <param name="MatchReturnValue" value="accept"/> <param name="NoMatchReturnValue" value="deny"/> <param name="LevelToMatch" value="warn"/> </filter> </appender> <root> <priority value ="debug" /> <appender-ref ref="A1" /> </root> </log4j:configuration> --- NEW FILE: filters.LevelMatchFilter.test4.4.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="A1" class="org.apache.log4j.FileAppender"> <param name="File" value="output/filters.LevelMatchFilter.test4.txt" /> <param name="Append" value="true" /> <layout class="org.apache.log4j.SimpleLayout"/> <filter class="org.apache.log4j.filters.LevelMatchFilter"> <param name="MatchReturnValue" value="accept"/> <param name="NoMatchReturnValue" value="deny"/> <param name="LevelToMatch" value="fatal"/> </filter> </appender> <root> <priority value ="debug" /> <appender-ref ref="A1" /> </root> </log4j:configuration> --- NEW FILE: DOMTestCase1.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="A1" class="org.apache.log4j.FileAppender"> <param name="File" value="output/temp.A1" /> <param name="Append" value="false" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p %c{2} - %m%n"/> </layout> </appender> <appender name="A2" class="org.apache.log4j.FileAppender"> <param name="File" value="output/temp.A2" /> <param name="Append" value="false" /> <layout class="org.apache.log4j.TTCCLayout"> <param name="DateFormat" value="ISO8601" /> </layout> </appender> <logger name="org.apache.log4j.xml"> <level value="debug" /> <appender-ref ref="A1" /> </logger> <root> <priority value ="debug" /> <appender-ref ref="A1" /> <appender-ref ref="A2" /> </root> </log4j:configuration> --- NEW FILE: filters.LevelMatchFilter.test4.0.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="A1" class="org.apache.log4j.FileAppender"> <param name="File" value="output/filters.LevelMatchFilter.test4.txt" /> <param name="Append" value="true" /> <layout class="org.apache.log4j.SimpleLayout"/> <filter class="org.apache.log4j.filters.LevelMatchFilter"> <param name="MatchReturnValue" value="accept"/> <param name="NoMatchReturnValue" value="deny"/> <param name="LevelToMatch" value="debug"/> </filter> </appender> <root> <priority value ="debug" /> <appender-ref ref="A1" /> </root> </log4j:configuration> --- NEW FILE: customLevel4.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration debug="false" xmlns:log4j='http://jakarta.apache.org/log4j/'> <appender name="TEMP" class="org.apache.log4j.FileAppender"> <param name="Append" value="false" /> <param name="File" value="output/temp" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p %c{2} - %m\n"/> </layout> </appender> <root> <level value="TRACE#org.apache.log4j.xml.XLevel"/> <appender-ref ref="TEMP" /> </root> </log4j:configuration> --- NEW FILE: defaultInit.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration debug="false" xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="D1" class="org.apache.log4j.ConsoleAppender"> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p %c{2} - %m%n"/> </layout> </appender> <root> <priority value ="OFF" /> <appender-ref ref="D1" /> </root> </log4j:configuration> --- NEW FILE: customLogger1.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' debug="false"> <appender name="TEMP" class="org.apache.log4j.FileAppender"> <param name="Append" value="false" /> <param name="File" value="output/temp" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p %c{2} - %m%n"/> </layout> </appender> <root> <level value ="TRACE" class="org.apache.log4j.xml.XLevel"/> <appender-ref ref="TEMP" /> </root> </log4j:configuration> --- NEW FILE: log4j.dtd --- <?xml version="1.0" encoding="UTF-8" ?> <!-- Authors: Chris Taylor, Ceki Gulcu. --> <!-- Version: 1.2 --> <!-- A configuration element consists of optional renderer elements,appender elements, categories and an optional root element. --> <!ELEMENT log4j:configuration (renderer*, appender*,(category|logger)*,root?, categoryFactory?)> <!-- The "threshold" attribute takes a level value such that all --> <!-- logging statements with a level equal or below this value are --> <!-- disabled. --> <!-- Setting the "debug" enable the printing of internal log4j logging --> <!-- statements. --> <!-- By default, debug attribute is "null", meaning that we not do touch --> <!-- internal log4j logging settings. The "null" value for the threshold --> <!-- attribute can be misleading. The threshold field of a repository --> <!-- cannot be set to null. The "null" value for the threshold attribute --> <!-- simply means don't touch the threshold field, the threshold field --> <!-- keeps its old value. --> <!ATTLIST log4j:configuration xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" threshold (all|debug|info|warn|error|fatal|off|null) "null" debug (true|false|null) "null" > <!-- renderer elements allow the user to customize the conversion of --> <!-- message objects to String. --> <!ELEMENT renderer EMPTY> <!ATTLIST renderer renderedClass CDATA #REQUIRED renderingClass CDATA #REQUIRED > <!-- Appenders must have a name and a class. --> <!-- Appenders may contain an error handler, a layout, optional parameters --> <!-- and filters. They may also reference (or include) other appenders. --> <!ELEMENT appender (errorHandler?, param*, layout?, filter*, appender-ref*)> <!ATTLIST appender name ID #REQUIRED class CDATA #REQUIRED > <!ELEMENT layout (param*)> <!ATTLIST layout class CDATA #REQUIRED > <!ELEMENT filter (param*)> <!ATTLIST filter class CDATA #REQUIRED > <!-- ErrorHandlers can be of any class. They can admit any number of --> <!-- parameters. --> <!ELEMENT errorHandler (param*, root-ref?, logger-ref*, appender-ref?)> <!ATTLIST errorHandler class CDATA #REQUIRED > <!ELEMENT root-ref EMPTY> <!ELEMENT logger-ref EMPTY> <!ATTLIST logger-ref ref IDREF #REQUIRED > <!ELEMENT param EMPTY> <!ATTLIST param name CDATA #REQUIRED value CDATA #REQUIRED > <!-- The priority class is org.apache.log4j.Level by default --> <!ELEMENT priority (param*)> <!ATTLIST priority class CDATA #IMPLIED value CDATA #REQUIRED > <!-- The level class is org.apache.log4j.Level by default --> <!ELEMENT level (param*)> <!ATTLIST level class CDATA #IMPLIED value CDATA #REQUIRED > <!-- If no level element is specified, then the configurator MUST not --> <!-- touch the level of the named category. --> <!ELEMENT category (param*,(priority|level)?,appender-ref*)> <!ATTLIST category class CDATA #IMPLIED name CDATA #REQUIRED additivity (true|false) "true" > <!-- If no level element is specified, then the configurator MUST not --> <!-- touch the level of the named logger. --> <!ELEMENT logger (level?,appender-ref*)> <!ATTLIST logger name ID #REQUIRED additivity (true|false) "true" > <!ELEMENT categoryFactory (param*)> <!ATTLIST categoryFactory class CDATA #REQUIRED> <!ELEMENT appender-ref EMPTY> <!ATTLIST appender-ref ref IDREF #REQUIRED > <!-- If no priority element is specified, then the configurator MUST not --> <!-- touch the priority of root. --> <!-- The root category always exists and cannot be subclassed. --> <!ELEMENT root (param*, (priority|level)?, appender-ref*)> <!-- ==================================================================== --> <!-- A logging event --> <!-- ==================================================================== --> <!ELEMENT log4j:eventSet (log4j:event*)> <!ATTLIST log4j:eventSet xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" version (1.1|1.2) "1.2" includesLocationInfo (true|false) "true" > <!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?, log4j:locationInfo?) > <!-- The timestamp format is application dependent. --> <!ATTLIST log4j:event logger CDATA #REQUIRED level CDATA #REQUIRED thread CDATA #REQUIRED timestamp CDATA #REQUIRED > <!ELEMENT log4j:message (#PCDATA)> <!ELEMENT log4j:NDC (#PCDATA)> <!ELEMENT log4j:throwable (#PCDATA)> <!ELEMENT log4j:locationInfo EMPTY> <!ATTLIST log4j:locationInfo class CDATA #REQUIRED method CDATA #REQUIRED file CDATA #REQUIRED line CDATA #REQUIRED > --- NEW FILE: filters.LevelMatchFilter.test4.3.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="A1" class="org.apache.log4j.FileAppender"> <param name="File" value="output/filters.LevelMatchFilter.test4.txt" /> <param name="Append" value="true" /> <layout class="org.apache.log4j.SimpleLayout"/> <filter class="org.apache.log4j.filters.LevelMatchFilter"> <param name="MatchReturnValue" value="accept"/> <param name="NoMatchReturnValue" value="deny"/> <param name="LevelToMatch" value="error"/> </filter> </appender> <root> <priority value ="debug" /> <appender-ref ref="A1" /> </root> </log4j:configuration> --- NEW FILE: Makefile.am --- EXTRA_DIST = log4j.dtd *.xml |
From: Eric E. <eri...@us...> - 2006-05-25 11:41:59
|
Update of /cvsroot/objecthandler/log4cxx-0.9.7/tests/src/net In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25784/tests/src/net Added Files: Makefile.am socketservertestcase.cpp socketservertestcase.h Log Message: --- NEW FILE: socketservertestcase.h --- /* * 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. */ #ifndef _LOG4CXX_NET_SOCKETSERVER_TESTCASE_H #define _LOG4CXX_NET_SOCKETSERVER_TESTCASE_H #define PORT 12345 #endif //_LOG4CXX_NET_SOCKETSERVER_TESTCASE_H --- NEW FILE: Makefile.am --- EXTRA_DIST = $(top_srcdir)/tests/src/net/*.cpp noinst_HEADERS= $(top_srcdir)/tests/src/net/*.h if TESTS noinst_LIBRARIES = libnet.a INCLUDES = -I$(top_srcdir)/include libnet_a_SOURCES = \ socketservertestcase.cpp check: libnet.a endif --- NEW FILE: socketservertestcase.cpp --- /* * 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. */ #ifdef WIN32 #include <windows.h> #endif #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <log4cxx/logger.h> #include <log4cxx/net/socketappender.h> #include <log4cxx/helpers/thread.h> #include <log4cxx/ndc.h> #include <log4cxx/mdc.h> #include <log4cxx/asyncappender.h> #include "socketservertestcase.h" #include "../util/compare.h" #include "../util/transformer.h" #include "../util/linenumberfilter.h" #include "../util/controlfilter.h" #include "../util/absolutedateandtimefilter.h" #include "../util/threadfilter.h" #include "../xml/xlevel.h" using namespace log4cxx; using namespace log4cxx::helpers; using namespace log4cxx::net; #define TEMP _T("output/temp") #define FILTERED _T("output/filtered") // %5p %x [%t] %c %m%n // DEBUG T1 [thread] org.apache.log4j.net.SocketAppenderTestCase Message 1 #define PAT1 \ _T("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) T1 \\[\\d*]\\ ") \ _T(".* Message \\d{1,2}") // DEBUG T2 [thread] patternlayouttest.cpp(?) Message 1 #define PAT2 \ _T("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) T2 \\[\\d*]\\ ") \ _T(".*socketservertestcase.cpp\\(\\d{1,4}\\) Message \\d{1,2}") // DEBUG T3 [thread] patternlayouttest.cpp(?) Message 1 #define PAT3 \ _T("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) T3 \\[\\d*]\\ ") \ _T(".*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 \ _T("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) some T4 MDC-TEST4 \\[\\d*]\\") \ _T(" (root|SocketServerTestCase) - Message \\d{1,2}") #define PAT5 \ _T("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) some5 T5 MDC-TEST5 \\[\\d*]\\") \ _T(" (root|SocketServerTestCase) - Message \\d{1,2}") #define PAT6 \ _T("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) some6 T6 client-test6 MDC-TEST6") \ _T(" \\[\\d*]\\ (root|SocketServerTestCase) - Message \\d{1,2}") #define PAT7 \ _T("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) some7 T7 client-test7 MDC-TEST7") \ _T(" \\[\\d*]\\ (root|SocketServerTestCase) - Message \\d{1,2}") // DEBUG some8 T8 shortSocketServer MDC-TEST7 [thread] SocketServerTestCase - Message 1 #define PAT8 \ _T("^(DEBUG| INFO| WARN|ERROR|FATAL|LETHAL) some8 T8 shortSocketServer") \ _T(" MDC-TEST8 \\[\\d*]\\ (root|SocketServerTestCase) - Message \\d{1,2}") class ShortSocketServerLauncher { public: ShortSocketServerLauncher() { if (!launched) { #ifdef WIN32 PROCESS_INFORMATION pi; STARTUPINFO si; ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); String commandLine(_T("shortsocketserver 8 input/socketServer")); BOOL bResult = ::CreateProcess(NULL, (LPTSTR)commandLine.c_str(), NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi); #else if(!::fork()) { ::execl("src/shortsocketserver", "shortsocketserver", "8", "input/socketServer", 0); ::perror("execl() failed"); ::exit(1); } else { sleep(1); } #endif launched = true; } } static bool launched; }; bool ShortSocketServerLauncher::launched = false; class SocketServerTestCase : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(SocketServerTestCase); CPPUNIT_TEST(test1); CPPUNIT_TEST(test2); CPPUNIT_TEST(test3); CPPUNIT_TEST(test4); CPPUNIT_TEST(test5); CPPUNIT_TEST(test6); CPPUNIT_TEST(test7); CPPUNIT_TEST(test8); CPPUNIT_TEST_SUITE_END(); SocketAppenderPtr socketAppender; LoggerPtr logger; LoggerPtr root; public: void setUp() { ShortSocketServerLauncher(); logger = Logger::getLogger(_T("org.apache.log4j.net.SocketServerTestCase")); root = Logger::getRootLogger(); } void tearDown() { socketAppender = 0; root->getLoggerRepository()->resetConfiguration(); logger = 0; root = 0; } /** The pattern on the server side: %5p %x [%t] %c %m%n. We are testing NDC functionality across the wire. */ void test1() { SocketAppenderPtr socketAppender = new SocketAppender(_T("localhost"), PORT); root->addAppender(socketAppender); common(_T("T1"), _T("key1"), _T("MDC-TEST1")); delay(1); ControlFilter cf; cf << PAT1; ThreadFilter threadFilter; std::vector<Filter *> filters; filters.push_back(&cf); filters.push_back(&threadFilter); try { Transformer::transform(TEMP, FILTERED, filters); } catch(UnexpectedFormatException& e) { tcout << _T("UnexpectedFormatException :") << e.getMessage() << std::endl; throw; } CPPUNIT_ASSERT(Compare::compare(FILTERED, _T("witness/socketServer.1"))); } void test2() { SocketAppenderPtr socketAppender = new SocketAppender(_T("localhost"), PORT); root->addAppender(socketAppender); common(_T("T2"), _T("key2"), _T("MDC-TEST2")); delay(1); ControlFilter cf; cf << PAT2; ThreadFilter threadFilter; LineNumberFilter lineNumberFilter; std::vector<Filter *> filters; filters.push_back(&cf); filters.push_back(&threadFilter); filters.push_back(&lineNumberFilter); try { Transformer::transform(TEMP, FILTERED, filters); } catch(UnexpectedFormatException& e) { tcout << _T("UnexpectedFormatException :") << e.getMessage() << std::endl; throw; } CPPUNIT_ASSERT(Compare::compare(FILTERED, _T("witness/socketServer.2"))); } void test3() { SocketAppenderPtr socketAppender = new SocketAppender(_T("localhost"), PORT); root->addAppender(socketAppender); common(_T("T3"), _T("key3"), _T("MDC-TEST3")); delay(1); ControlFilter cf; cf << PAT3; ThreadFilter threadFilter; LineNumberFilter lineNumberFilter; std::vector<Filter *> filters; filters.push_back(&cf); filters.push_back(&threadFilter); filters.push_back(&lineNumberFilter); try { Transformer::transform(TEMP, FILTERED, filters); } catch(UnexpectedFormatException& e) { tcout << _T("UnexpectedFormatException :") << e.getMessage() << std::endl; throw; } CPPUNIT_ASSERT(Compare::compare(FILTERED, _T("witness/socketServer.3"))); } void test4() { SocketAppenderPtr socketAppender = new SocketAppender(_T("localhost"), PORT); root->addAppender(socketAppender); NDC::push(_T("some")); common(_T("T4"), _T("key4"), _T("MDC-TEST4")); NDC::pop(); delay(1); ControlFilter cf; cf << PAT4; ThreadFilter threadFilter; std::vector<Filter *> filters; filters.push_back(&cf); filters.push_back(&threadFilter); try { Transformer::transform(TEMP, FILTERED, filters); } catch(UnexpectedFormatException& e) { tcout << _T("UnexpectedFormatException :") << e.getMessage() << std::endl; throw; } CPPUNIT_ASSERT(Compare::compare(FILTERED, _T("witness/socketServer.4"))); } void test5() { SocketAppenderPtr socketAppender = new SocketAppender(_T("localhost"), PORT); AsyncAppenderPtr asyncAppender = new AsyncAppender(); root->addAppender(socketAppender); root->addAppender(asyncAppender); NDC::push(_T("some5")); common(_T("T5"), _T("key5"), _T("MDC-TEST5")); NDC::pop(); delay(2); ControlFilter cf; cf << PAT5; ThreadFilter threadFilter; std::vector<Filter *> filters; filters.push_back(&cf); filters.push_back(&threadFilter); try { Transformer::transform(TEMP, FILTERED, filters); } catch(UnexpectedFormatException& e) { tcout << _T("UnexpectedFormatException :") << e.getMessage() << std::endl; throw; } CPPUNIT_ASSERT(Compare::compare(FILTERED, _T("witness/socketServer.5"))); } void test6() { SocketAppenderPtr socketAppender = new SocketAppender(_T("localhost"), PORT); AsyncAppenderPtr asyncAppender = new AsyncAppender(); root->addAppender(socketAppender); root->addAppender(asyncAppender); NDC::push(_T("some6")); MDC::put(_T("hostID"), _T("client-test6")); common(_T("T6"), _T("key6"), _T("MDC-TEST6")); NDC::pop(); MDC::remove(_T("hostID")); delay(2); ControlFilter cf; cf << PAT6; ThreadFilter threadFilter; std::vector<Filter *> filters; filters.push_back(&cf); filters.push_back(&threadFilter); try { Transformer::transform(TEMP, FILTERED, filters); } catch(UnexpectedFormatException& e) { tcout << _T("UnexpectedFormatException :") << e.getMessage() << std::endl; throw; } CPPUNIT_ASSERT(Compare::compare(FILTERED, _T("witness/socketServer.6"))); } void test7() { SocketAppenderPtr socketAppender = new SocketAppender(_T("localhost"), PORT); AsyncAppenderPtr asyncAppender = new AsyncAppender(); root->addAppender(socketAppender); root->addAppender(asyncAppender); NDC::push(_T("some7")); MDC::put(_T("hostID"), _T("client-test7")); common(_T("T7"), _T("key7"), _T("MDC-TEST7")); NDC::pop(); MDC::remove(_T("hostID")); delay(2); ControlFilter cf; cf << PAT7; ThreadFilter threadFilter; std::vector<Filter *> filters; filters.push_back(&cf); filters.push_back(&threadFilter); try { Transformer::transform(TEMP, FILTERED, filters); } catch(UnexpectedFormatException& e) { tcout << _T("UnexpectedFormatException :") << e.getMessage() << std::endl; throw; } CPPUNIT_ASSERT(Compare::compare(FILTERED, _T("witness/socketServer.7"))); } void test8() { SocketAppenderPtr socketAppender = new SocketAppender(_T("localhost"), PORT); root->addAppender(socketAppender); NDC::push(_T("some8")); common(_T("T8"), _T("key8"), _T("MDC-TEST8")); NDC::pop(); delay(2); ControlFilter cf; cf << PAT8; ThreadFilter threadFilter; std::vector<Filter *> filters; filters.push_back(&cf); filters.push_back(&threadFilter); try { Transformer::transform(TEMP, FILTERED, filters); } catch(UnexpectedFormatException& e) { tcout << _T("UnexpectedFormatException :") << e.getMessage() << std::endl; throw; } CPPUNIT_ASSERT(Compare::compare(FILTERED, _T("witness/socketServer.8"))); } void common(const String& dc, const String& key, const String& val) { int i = -1; NDC::push(dc); MDC::put(key, val); i++; LOG4CXX_LOG(logger, XLevel::TRACE, _T("Message ") << i); i++; LOG4CXX_DEBUG(logger, _T("Message ") << i); i++; LOG4CXX_DEBUG(root, _T("Message ") << i); i++; LOG4CXX_INFO(logger, _T("Message ") << i); i++; LOG4CXX_WARN(logger, _T("Message ") << i); i++; LOG4CXX_LOG(logger, XLevel::LETHAL, _T("Message ") << i); //5 NDC::pop(); MDC::remove(key); } void delay(int secs) { Thread::sleep(secs * 1000); } }; CPPUNIT_TEST_SUITE_REGISTRATION(SocketServerTestCase); |
From: Eric E. <eri...@us...> - 2006-05-25 11:41:59
|
Update of /cvsroot/objecthandler/log4cxx-0.9.7/tests/src/helpers In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25784/tests/src/helpers Added Files: Makefile.am boundedfifotestcase.cpp cyclicbuffertestcase.cpp optionconvertertestcase.cpp Log Message: --- NEW FILE: cyclicbuffertestcase.cpp --- /* * 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. */ #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <log4cxx/logmanager.h> #include <log4cxx/logger.h> #include <log4cxx/helpers/cyclicbuffer.h> #include <log4cxx/spi/loggingevent.h> using namespace log4cxx; using namespace log4cxx::helpers; using namespace log4cxx::spi; #define MAX 1000 class CyclicBufferTestCase : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(CyclicBufferTestCase); CPPUNIT_TEST(test0); CPPUNIT_TEST(test1); CPPUNIT_TEST(testResize); CPPUNIT_TEST_SUITE_END(); LoggerPtr logger; std::vector<LoggingEventPtr> e; public: void setUp() { logger = Logger::getLogger(_T("x")); e.reserve(1000); for (int i = 0; i < MAX; i++) { e.push_back( new LoggingEvent(_T(""), logger, Level::DEBUG, _T("e"))); } } void tearDown() { LogManager::shutdown(); } void test0() { int size = 2; CyclicBuffer cb(size); CPPUNIT_ASSERT_EQUAL(size, cb.getMaxSize()); cb.add(e[0]); CPPUNIT_ASSERT_EQUAL(1, cb.length()); CPPUNIT_ASSERT_EQUAL(e[0], cb.get()); CPPUNIT_ASSERT_EQUAL(0, cb.length()); CPPUNIT_ASSERT(cb.get() == 0); CPPUNIT_ASSERT_EQUAL(0, cb.length()); CyclicBuffer cb2(size); cb2.add(e[0]); cb2.add(e[1]); CPPUNIT_ASSERT_EQUAL(2, cb2.length()); CPPUNIT_ASSERT_EQUAL(e[0], cb2.get()); CPPUNIT_ASSERT_EQUAL(1, cb2.length()); CPPUNIT_ASSERT_EQUAL(e[1], cb2.get()); CPPUNIT_ASSERT_EQUAL(0, cb2.length()); CPPUNIT_ASSERT(cb2.get() == 0); CPPUNIT_ASSERT_EQUAL(0, cb2.length()); } void test1() { for (int bufSize = 1; bufSize <= 128; bufSize *= 2) doTest1(bufSize); } void doTest1(int size) { //System.out.println("Doing test with size = "+size); CyclicBuffer cb(size); CPPUNIT_ASSERT_EQUAL(size, cb.getMaxSize()); int i; for (i = -(size + 10); i < (size + 10); i++) { CPPUNIT_ASSERT(cb.get(i) == 0); } for (i = 0; i < MAX; i++) { cb.add(e[i]); int limit = (i < (size - 1)) ? i : (size - 1); //System.out.println("\nLimit is " + limit + ", i="+i); for (int j = limit; j >= 0; j--) { //System.out.println("i= "+i+", j="+j); CPPUNIT_ASSERT_EQUAL(e[i - (limit - j)], cb.get(j)); } CPPUNIT_ASSERT(cb.get(-1) == 0); CPPUNIT_ASSERT(cb.get(limit + 1) == 0); } } void testResize() { for (int isize = 1; isize <= 128; isize *= 2) { doTestResize(isize, (isize / 2) + 1, (isize / 2) + 1); doTestResize(isize, (isize / 2) + 1, isize + 10); doTestResize(isize, isize + 10, (isize / 2) + 1); doTestResize(isize, isize + 10, isize + 10); } } void doTestResize(int initialSize, int numberOfAdds, int newSize) { //System.out.println("initialSize = "+initialSize+", numberOfAdds=" // +numberOfAdds+", newSize="+newSize); CyclicBuffer cb(initialSize); for (int i = 0; i < numberOfAdds; i++) { cb.add(e[i]); } cb.resize(newSize); int offset = numberOfAdds - initialSize; if (offset < 0) { offset = 0; } int len = (newSize < numberOfAdds) ? newSize : numberOfAdds; len = (len < initialSize) ? len : initialSize; //System.out.println("Len = "+len+", offset="+offset); for (int j = 0; j < len; j++) { CPPUNIT_ASSERT_EQUAL(e[offset + j], cb.get(j)); } } }; CPPUNIT_TEST_SUITE_REGISTRATION(CyclicBufferTestCase); --- NEW FILE: boundedfifotestcase.cpp --- /* * 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. */ #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <log4cxx/logmanager.h> #include <log4cxx/logger.h> #include <log4cxx/helpers/boundedfifo.h> #include <log4cxx/spi/loggingevent.h> #include <log4cxx/helpers/strictmath.h> using namespace log4cxx; using namespace log4cxx::helpers; using namespace log4cxx::spi; #define MAX 1000 class BoundedFIFOTestCase : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(BoundedFIFOTestCase); CPPUNIT_TEST(test1); CPPUNIT_TEST(test2); CPPUNIT_TEST(testResize1); CPPUNIT_TEST(testResize2); CPPUNIT_TEST(testResize3); CPPUNIT_TEST_SUITE_END(); LoggerPtr logger; std::vector<LoggingEventPtr> e; public: void setUp() { logger = Logger::getLogger(_T("x")); e.reserve(1000); for (int i = 0; i < MAX; i++) { e.push_back( new LoggingEvent(_T(""), logger, Level::DEBUG, _T("e"))); } } void tearDown() { LogManager::shutdown(); } void test1() { for (int size = 1; size <= 128; size *= 2) { BoundedFIFO bf(size); CPPUNIT_ASSERT_EQUAL(size, bf.getMaxSize()); CPPUNIT_ASSERT(bf.get() == 0); int i; int j; int k; for (i = 1; i < (2 * size); i++) { for (j = 0; j < i; j++) { //tcout << _T("Putting ") << e[j] << std::endl; bf.put(e[j]); CPPUNIT_ASSERT_EQUAL((j < size) ? (j + 1) : size, bf.length()); } int max = (size < j) ? size : j; j--; for (k = 0; k <= j; k++) { //tcout << _T("max=") << max << _T(", j=") << j // << _T(", k="= << k << std::endl; CPPUNIT_ASSERT_EQUAL(((max - k) > 0) ? (max - k) : 0, bf.length()); LoggingEventPtr r = bf.get(); //tcout << _t("Got ") << r << std::endl; if (k >= size) { CPPUNIT_ASSERT(r == 0); } else { CPPUNIT_ASSERT(r == e[k]); } } } //tcout << _T("Passed size=") << size << std::endl; } } void test2() { int size = 3; BoundedFIFO bf(size); bf.put(e[0]); CPPUNIT_ASSERT_EQUAL(e[0], bf.get()); CPPUNIT_ASSERT(bf.get() == 0); bf.put(e[1]); CPPUNIT_ASSERT_EQUAL(1, bf.length()); bf.put(e[2]); CPPUNIT_ASSERT_EQUAL(2, bf.length()); bf.put(e[3]); CPPUNIT_ASSERT_EQUAL(3, bf.length()); CPPUNIT_ASSERT_EQUAL(e[1], bf.get()); CPPUNIT_ASSERT_EQUAL(2, bf.length()); CPPUNIT_ASSERT_EQUAL(e[2], bf.get()); CPPUNIT_ASSERT_EQUAL(1, bf.length()); CPPUNIT_ASSERT_EQUAL(e[3], bf.get()); CPPUNIT_ASSERT_EQUAL(0, bf.length()); CPPUNIT_ASSERT(bf.get() == 0); CPPUNIT_ASSERT_EQUAL(0, bf.length()); } void testResize1() { int size = 10; for (int n = 1; n < (size * 2); n++) { for (int i = 0; i < (size * 2); i++) { BoundedFIFO bf(size); for (int f = 0; f < i; f++) { bf.put(e[f]); } bf.resize(n); int expectedSize = StrictMath::minimum(n, StrictMath::minimum(i, size)); CPPUNIT_ASSERT_EQUAL(expectedSize, bf.length()); for (int c = 0; c < expectedSize; c++) { CPPUNIT_ASSERT_EQUAL(e[c], bf.get()); } } } } void testResize2() { int size = 10; for (int n = 1; n < (size * 2); n++) { for (int i = 0; i < (size * 2); i++) { for (int d = 0; d < StrictMath::minimum(i, size); d++) { BoundedFIFO bf(size); for (int p = 0; p < i; p++) { bf.put(e[p]); } for (int g = 0; g < d; g++) { bf.get(); } // x = the number of elems in int x = bf.length(); bf.resize(n); int expectedSize = StrictMath::minimum(n, x); CPPUNIT_ASSERT_EQUAL(expectedSize, bf.length()); for (int c = 0; c < expectedSize; c++) { CPPUNIT_ASSERT_EQUAL(e[c + d], bf.get()); } CPPUNIT_ASSERT(bf.get() == 0); } } } } void testResize3() { int size = 10; for (int n = 1; n < (size * 2); n++) { for (int i = 0; i < size; i++) { for (int d = 0; d < i; d++) { for (int r = 0; r < d; r++) { BoundedFIFO bf(size); for (int p0 = 0; p0 < i; p0++) bf.put(e[p0]); for (int g = 0; g < d; g++) bf.get(); for (int p1 = 0; p1 < r; p1++) bf.put(e[i + p1]); int x = bf.length(); bf.resize(n); int expectedSize = StrictMath::minimum(n, x); CPPUNIT_ASSERT_EQUAL(expectedSize, bf.length()); for (int c = 0; c < expectedSize; c++) { CPPUNIT_ASSERT_EQUAL(e[c + d], bf.get()); } //CPPUNIT_ASSERT(bf.get() == 0); } } } } } }; CPPUNIT_TEST_SUITE_REGISTRATION(BoundedFIFOTestCase); --- NEW FILE: Makefile.am --- EXTRA_DIST = *.cpp if TESTS noinst_LIBRARIES = libhelpers.a INCLUDES = -I$(top_srcdir)/include libhelpers_a_SOURCES = \ boundedfifotestcase.cpp\ cyclicbuffertestcase.cpp\ optionconvertertestcase.cpp check: libhelpers.a endif --- NEW FILE: optionconvertertestcase.cpp --- /* * 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. */ #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <log4cxx/helpers/optionconverter.h> #include <log4cxx/helpers/properties.h> #include <log4cxx/helpers/system.h> using namespace log4cxx; using namespace log4cxx::helpers; using namespace log4cxx::spi; #define MAX 1000 class OptionConverterTestCase : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(OptionConverterTestCase); CPPUNIT_TEST(varSubstTest1); CPPUNIT_TEST(varSubstTest2); CPPUNIT_TEST(varSubstTest3); CPPUNIT_TEST(varSubstTest4); CPPUNIT_TEST(varSubstTest5); CPPUNIT_TEST_SUITE_END(); Properties props; Properties nullProperties; public: void setUp() { props.setProperty(_T("TOTO"), _T("wonderful")); props.setProperty(_T("key1"), _T("value1")); props.setProperty(_T("key2"), _T("value2")); System::setProperties(props); } void tearDown() { } void varSubstTest1() { String r; r = OptionConverter::substVars(_T("hello world."), nullProperties); CPPUNIT_ASSERT(r == _T("hello world.")); r = OptionConverter::substVars(_T("hello ${TOTO} world."), nullProperties); CPPUNIT_ASSERT(r == _T("hello wonderful world.")); } void varSubstTest2() { String r; r = OptionConverter::substVars(_T("Test2 ${key1} mid ${key2} end."), nullProperties); CPPUNIT_ASSERT(r == _T("Test2 value1 mid value2 end.")); } void varSubstTest3() { String r; r = OptionConverter::substVars( _T("Test3 ${unset} mid ${key1} end."), nullProperties); CPPUNIT_ASSERT(r == _T("Test3 mid value1 end.")); } void varSubstTest4() { String res; String val = _T("Test4 ${incomplete "); try { res = OptionConverter::substVars(val, nullProperties); } catch(IllegalArgumentException& e) { String witness = String(_T("\""))+val + _T("\" has no closing brace. Opening brace at position 6."); String errorMsg = e.getMessage(); CPPUNIT_ASSERT(errorMsg == witness); } } void varSubstTest5() { Properties props; props.setProperty(_T("p1"), _T("x1")); props.setProperty(_T("p2"), _T("${p1}")); String res = OptionConverter::substVars(_T("${p2}"), props); CPPUNIT_ASSERT(res == _T("x1")); } }; CPPUNIT_TEST_SUITE_REGISTRATION(OptionConverterTestCase); |
Update of /cvsroot/objecthandler/log4cxx-0.9.7/tests/src/util In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25784/tests/src/util Added Files: Makefile.am absolutedateandtimefilter.cpp absolutedateandtimefilter.h absolutetimefilter.cpp absolutetimefilter.h compare.cpp compare.h controlfilter.cpp controlfilter.h filter.cpp filter.h iso8601filter.cpp iso8601filter.h linenumberfilter.cpp linenumberfilter.h relativetimefilter.cpp relativetimefilter.h threadfilter.cpp threadfilter.h transformer.cpp transformer.h xmllineattributefilter.cpp xmllineattributefilter.h xmlthreadfilter.cpp xmlthreadfilter.h xmltimestampfilter.cpp xmltimestampfilter.h Log Message: --- NEW FILE: xmltimestampfilter.h --- /* * 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. */ #ifndef _LOG4CXX_TESTS_UTIL_XML_TIMESTAMP_FILTER_H #define _LOG4CXX_TESTS_UTIL_XML_TIMESTAMP_FILTER_H #include "filter.h" namespace log4cxx { class XMLTimestampFilter : public Filter { public: String filter(const String& in) const throw(UnexpectedFormatException); }; } #endif //_LOG4CXX_TESTS_UTIL_XML_TIMESTAMP_FILTER_H --- NEW FILE: compare.h --- /* * 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. */ #include <log4cxx/helpers/tchar.h> namespace log4cxx { class Compare { public: static bool compare(const String& file1, const String& file2); private: /// Prints file on the console. static void outputFile(const String& file); }; } --- NEW FILE: filter.h --- /* * 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. */ #ifndef _LOG4CXX_TESTS_UTIL_FILTER_H #define _LOG4CXX_TESTS_UTIL_FILTER_H #include <log4cxx/helpers/tchar.h> #include <log4cxx/helpers/exception.h> #define BASIC_PAT _T("\\[\\d*\\] (FATAL|ERROR|WARN|INFO|DEBUG)") #define ISO8601_PAT _T("^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3}") #define ABSOLUTE_DATE_AND_TIME_PAT \ _T("^\\d{1,2} .{2,6}\\.? 200\\d \\d{2}:\\d{2}:\\d{2},\\d{3}") #define ABSOLUTE_TIME_PAT _T("^\\d{2}:\\d{2}:\\d{2},\\d{3}") #define RELATIVE_TIME_PAT _T("^\\d{1,10}") namespace log4cxx { class UnexpectedFormatException : public helpers::Exception { public: UnexpectedFormatException(const String& message) : message(message) {} virtual String getMessage() { return message; } protected: String message; }; class Filter { public: virtual String filter(const String& in) const throw(UnexpectedFormatException) = 0; static String merge(const String& pattern, const String& in, const String& fmt); static bool match(const String& pattern, const String& in); }; } #endif //_LOG4CXX_TESTS_UTIL_FILTER_H --- NEW FILE: controlfilter.h --- /* * 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. */ #ifndef _LOG4CXX_TESTS_UTIL_CONTROL_FILTER_H #define _LOG4CXX_TESTS_UTIL_CONTROL_FILTER_H #include "filter.h" #include <vector> namespace log4cxx { class ControlFilter : public Filter { public: ControlFilter(); String filter(const String& in) const throw(UnexpectedFormatException); ControlFilter& operator<<(const String& allowedPattern); protected: std::vector<String> allowedPatterns; }; } #endif //_LOG4CXX_TESTS_UTIL_CONTROL_FILTER_H --- NEW FILE: transformer.cpp --- /* * 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. */ #include "transformer.h" #include <fstream> using namespace log4cxx; typedef std::basic_ifstream<TCHAR> ifstream; typedef std::basic_ofstream<TCHAR> ofstream; void Transformer::transform(const String& in, const String& out, const std::vector<Filter *>& filters) throw(UnexpectedFormatException) { String line; USES_CONVERSION ifstream input(T2A(in.c_str())); ofstream output(T2A(out.c_str())); while (!std::getline(input, line).fail()) { for (std::vector<Filter *>::size_type i = 0; i < filters.size(); i++) { line = filters[i]->filter(line); } if (!line.empty()) { output << line << std::endl; } } } void Transformer::transform(const String& in, const String& out, const Filter& filter) throw(UnexpectedFormatException) { String line; USES_CONVERSION ifstream input(T2A(in.c_str())); ofstream output(T2A(out.c_str())); while (!std::getline(input, line).fail()) { line = filter.filter(line); output << line << std::endl; } } --- NEW FILE: absolutedateandtimefilter.cpp --- /* * 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. */ #include "absolutedateandtimefilter.h" using namespace log4cxx; using namespace log4cxx::helpers; String AbsoluteDateAndTimeFilter::filter(const String& in) const throw(UnexpectedFormatException) { return merge(ABSOLUTE_DATE_AND_TIME_PAT, in, _T("")); } --- NEW FILE: xmltimestampfilter.cpp --- /* * 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. */ #include "xmltimestampfilter.h" using namespace log4cxx; using namespace log4cxx::helpers; String XMLTimestampFilter::filter(const String& in) const throw(UnexpectedFormatException) { return merge(_T("timestamp=\"\\d{10,13}\""), in, _T("timestamp=\"XXX\"")); } --- NEW FILE: transformer.h --- /* * 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. */ #ifndef _LOG4CXX_TESTS_UTIL_TRANSFORMER_H #define _LOG4CXX_TESTS_UTIL_TRANSFORMER_H #include "filter.h" #include <vector> namespace log4cxx { class Transformer { public: static void transform(const String& in, const String& out, const std::vector<Filter *>& filters) throw(UnexpectedFormatException); static void transform(const String& in, const String& out, const Filter& filter) throw(UnexpectedFormatException); }; } #endif //_LOG4CXX_TESTS_UTIL_TRANSFORMER_H --- NEW FILE: iso8601filter.cpp --- /* * 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. */ #include "iso8601filter.h" using namespace log4cxx; using namespace log4cxx::helpers; String ISO8601Filter::filter(const String& in) const throw(UnexpectedFormatException) { return merge(ISO8601_PAT, in, _T("")); } --- NEW FILE: linenumberfilter.cpp --- /* * 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. */ #include "linenumberfilter.h" using namespace log4cxx; using namespace log4cxx::helpers; String LineNumberFilter::filter(const String& in) const throw(UnexpectedFormatException) { String temp = merge(_T(" [^ ]*[\\\\]"), in, _T(" ")); return merge(_T("\\(\\d{1,4}\\)"), temp, _T("\\(X\\)")); } --- NEW FILE: compare.cpp --- /* * 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. */ #include "compare.h" #include <fstream> typedef std::basic_ifstream<TCHAR> ifstream; using namespace log4cxx; bool Compare::compare(const String& file1, const String& file2) { USES_CONVERSION ifstream in1(T2A(file1.c_str())); ifstream in2(T2A(file2.c_str())); String s1; int lineCounter = 0; while (!std::getline(in1, s1).fail()) { lineCounter++; String s2; std::getline(in2, s2); if (s1 != s2) { tcout << _T("Files [") << file1 << _T("] and [") << file2 << _T("] differ on line ") << lineCounter << std::endl; tcout << _T("One reads: [") << s1 << _T("].") << std::endl; tcout << _T("Other reads:[") << s2 << _T("].") << std::endl; outputFile(file1); outputFile(file2); return false; } } // the second file is longer if (in2.get() != ifstream::traits_type::eof()) { tcout << _T("File [") << file2 << _T("] longer than file [") << file1 << _T("].") << std::endl; outputFile(file1); outputFile(file2); return false; } return true; } void Compare::outputFile(const String& file) { USES_CONVERSION; ifstream in1(T2A(file.c_str())); String s1; int lineCounter = 0; tcout << _T("--------------------------------") << std::endl; tcout << _T("Contents of ") << file << _T(":") << std::endl; while (!std::getline(in1, s1).fail()) { lineCounter++; tcout << lineCounter; if (lineCounter < 10) { tcout << _T(" : "); } else if (lineCounter < 100) { tcout << _T(" : "); } else if (lineCounter < 1000) { tcout << _T(" : "); } else { tcout << _T(": "); } tcout << s1 << std::endl; } } --- NEW FILE: threadfilter.cpp --- /* * 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. */ #include "threadfilter.h" using namespace log4cxx; using namespace log4cxx::helpers; String ThreadFilter::filter(const String& in) const throw(UnexpectedFormatException) { return merge(_T("\\[\\d+\\]"), in, _T("\\[main]")); } --- NEW FILE: relativetimefilter.cpp --- /* * 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. */ #include "relativetimefilter.h" using namespace log4cxx; using namespace log4cxx::helpers; String RelativeTimeFilter::filter(const String& in) const throw(UnexpectedFormatException) { return merge(RELATIVE_TIME_PAT, in, _T("")); } --- NEW FILE: Makefile.am --- EXTRA_DIST = $(top_srcdir)/tests/src/util/*.cpp noinst_HEADERS= $(top_srcdir)/tests/src/util/*.h if TESTS noinst_LIBRARIES = libutil.a INCLUDES = -I$(top_srcdir)/include libutil_a_SOURCES = \ absolutetimefilter.cpp\ absolutedateandtimefilter.cpp\ compare.cpp\ controlfilter.cpp\ filter.cpp\ iso8601filter.cpp\ linenumberfilter.cpp\ relativetimefilter.cpp\ threadfilter.cpp\ transformer.cpp\ xmllineattributefilter.cpp\ xmltimestampfilter.cpp \ xmlthreadfilter.cpp check: libutil.a endif --- NEW FILE: xmllineattributefilter.cpp --- /* * 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. */ #include "xmllineattributefilter.h" using namespace log4cxx; using namespace log4cxx::helpers; String XMLLineAttributeFilter::filter(const String& in) const throw(UnexpectedFormatException) { String temp = merge(_T("file=\"[^ ]*[\\\\]"), in, _T("file=\"")); return merge(_T("line=\"\\d{1,3}\""), temp, _T("line=\"X\"")); } --- NEW FILE: xmlthreadfilter.h --- /* * 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. */ #ifndef _LOG4CXX_TESTS_UTIL_XML_THREAD_FILTER_H #define _LOG4CXX_TESTS_UTIL_XML_THREAD_FILTER_H #include "filter.h" namespace log4cxx { class XMLThreadFilter : public Filter { public: String filter(const String& in) const throw(UnexpectedFormatException); }; } #endif //_LOG4CXX_TESTS_UTIL_XML_THREAD_FILTER_H --- NEW FILE: relativetimefilter.h --- /* * 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. */ #ifndef _LOG4CXX_TESTS_UTIL_REL_TIME_FILTER_H #define _LOG4CXX_TESTS_UTIL_REL_TIME_FILTER_H #include "filter.h" namespace log4cxx { class RelativeTimeFilter : public Filter { public: String filter(const String& in) const throw(UnexpectedFormatException); }; } #endif //_LOG4CXX_TESTS_UTIL_REL_TIME_FILTER_H --- NEW FILE: xmllineattributefilter.h --- /* * 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. */ #ifndef _LOG4CXX_TESTS_UTIL_XML_LINE_ATTRIBUTE_FILTER_H #define _LOG4CXX_TESTS_UTIL_XML_LINE_ATTRIBUTE_FILTER_H #include "filter.h" namespace log4cxx { class XMLLineAttributeFilter : public Filter { public: String filter(const String& in) const throw(UnexpectedFormatException); }; } #endif //_LOG4CXX_TESTS_UTIL_XML_LINE_ATTRIBUTE_FILTER_H --- NEW FILE: absolutedateandtimefilter.h --- /* * 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. */ #ifndef _LOG4CXX_TESTS_UTIL_ABS_DATE_TIME_FILTER_H #define _LOG4CXX_TESTS_UTIL_ABS_DATE_TIME_FILTER_H #include "filter.h" namespace log4cxx { class AbsoluteDateAndTimeFilter : public Filter { public: String filter(const String& in) const throw(UnexpectedFormatException); }; } #endif //_LOG4CXX_TESTS_UTIL_ABS_DATE_TIME_FILTER_H --- NEW FILE: xmlthreadfilter.cpp --- /* * 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. */ #include "xmlthreadfilter.h" using namespace log4cxx; using namespace log4cxx::helpers; String XMLThreadFilter::filter(const String& in) const throw(UnexpectedFormatException) { return merge(_T("thread=\"\\d{1,10}\""), in, _T("thread=\"main\"")); } --- NEW FILE: absolutetimefilter.h --- /* * 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. */ #ifndef _LOG4CXX_TESTS_UTIL_ABS_TIME_FILTER_H #define _LOG4CXX_TESTS_UTIL_ABS_TIME_FILTER_H #include "filter.h" namespace log4cxx { class AbsoluteTimeFilter : public Filter { public: String filter(const String& in) const throw(UnexpectedFormatException); }; } #endif //_LOG4CXX_TESTS_UTIL_ABS_TIME_FILTER_H --- NEW FILE: filter.cpp --- /* * 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. */ #include <boost/regex.hpp> #include "filter.h" using namespace log4cxx; using namespace log4cxx::helpers; using namespace boost; String Filter::merge(const String& pattern, const String& in, const String& fmt) { USES_CONVERSION; std::string convPattern = T2A(pattern.c_str()); std::string convIn = T2A(in.c_str()); std::string convFmt = T2A(fmt.c_str()); std::string result = RegEx(convPattern).Merge(convIn, convFmt); return A2T(result.c_str()); } bool Filter::match(const String& pattern, const String& in) { USES_CONVERSION; std::string convPattern = T2A(pattern.c_str()); std::string convIn = T2A(in.c_str()); return RegEx(convPattern).Match(convIn); } --- NEW FILE: linenumberfilter.h --- /* * 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. */ #ifndef _LOG4CXX_TESTS_UTIL_LINE_NUMBER_FILTER_H #define _LOG4CXX_TESTS_UTIL_LINE_NUMBER_FILTER_H #include "filter.h" namespace log4cxx { class LineNumberFilter : public Filter { public: String filter(const String& in) const throw(UnexpectedFormatException); }; } #endif //_LOG4CXX_TESTS_UTIL_LINE_NUMBER_FILTER_H --- NEW FILE: controlfilter.cpp --- /* * 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. */ #include "controlfilter.h" using namespace log4cxx; using namespace log4cxx::helpers; ControlFilter::ControlFilter() { } String ControlFilter::filter(const String& in) const throw(UnexpectedFormatException) { int len = allowedPatterns.size(); for (int i = 0; i < len; i++) { if (match(allowedPatterns[i], in)) { return in; } } throw UnexpectedFormatException(String(_T("[")) + in + _T("]")); } ControlFilter& ControlFilter::operator<<(const String& allowedPattern) { allowedPatterns.push_back(allowedPattern); return *this; } --- NEW FILE: iso8601filter.h --- /* * 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. */ #ifndef _LOG4CXX_TESTS_UTIL_ISO_8601_FILTER_H #define _LOG4CXX_TESTS_UTIL_ISO_8601_FILTER_H #include "filter.h" namespace log4cxx { class ISO8601Filter : public Filter { public: String filter(const String& in) const throw(UnexpectedFormatException); }; } #endif //_LOG4CXX_TESTS_UTIL_ISO_8601_FILTER_H --- NEW FILE: threadfilter.h --- /* * 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. */ #ifndef _LOG4CXX_TESTS_UTIL_THREAD_FILTER_H #define _LOG4CXX_TESTS_UTIL_THREAD_FILTER_H #include "filter.h" namespace log4cxx { class ThreadFilter : public Filter { public: String filter(const String& in) const throw(UnexpectedFormatException); }; } #endif //_LOG4CXX_TESTS_UTIL_THREAD_FILTER_H --- NEW FILE: absolutetimefilter.cpp --- /* * 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. */ #include "absolutetimefilter.h" using namespace log4cxx; using namespace log4cxx::helpers; String AbsoluteTimeFilter::filter(const String& in) const throw(UnexpectedFormatException) { return merge(ABSOLUTE_TIME_PAT, in, _T("")); } |
From: Eric E. <eri...@us...> - 2006-05-25 11:41:58
|
Update of /cvsroot/objecthandler/log4cxx-0.9.7/tests/src/defaultinit In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25784/tests/src/defaultinit Added Files: Makefile.am testcase1.cpp testcase2.cpp testcase3.cpp testcase4.cpp Log Message: --- NEW FILE: testcase4.cpp --- /* * 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. */ #include <log4cxx/config.h> #ifdef HAVE_XML #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <log4cxx/logmanager.h> #include <log4cxx/logger.h> using namespace log4cxx; class TestCase4 : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(TestCase4); CPPUNIT_TEST(combinedTest); CPPUNIT_TEST_SUITE_END(); public: void setUp() { } void tearDown() { LogManager::shutdown(); } void combinedTest() { LoggerPtr root = Logger::getRootLogger(); bool rootIsConfigured = !root->getAllAppenders().empty(); CPPUNIT_ASSERT(rootIsConfigured); AppenderList list = root->getAllAppenders(); AppenderPtr appender = list.front(); CPPUNIT_ASSERT(appender->getName() == _T("D1")); CPPUNIT_ASSERT(list.size() == 1); } }; CPPUNIT_TEST_SUITE_REGISTRATION(TestCase4); #endif //HAVE_XML --- NEW FILE: testcase1.cpp --- /* * 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. */ #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <log4cxx/logmanager.h> #include <log4cxx/logger.h> using namespace log4cxx; class TestCase1 : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(TestCase1); CPPUNIT_TEST(noneTest); CPPUNIT_TEST_SUITE_END(); public: void setUp() { } void tearDown() { LogManager::shutdown(); } void noneTest() { LoggerPtr root = Logger::getRootLogger(); bool rootIsConfigured = !root->getAllAppenders().empty(); CPPUNIT_ASSERT(!rootIsConfigured); } }; CPPUNIT_TEST_SUITE_REGISTRATION(TestCase1); --- NEW FILE: testcase3.cpp --- /* * 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. */ #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <log4cxx/logmanager.h> #include <log4cxx/logger.h> using namespace log4cxx; class TestCase3 : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(TestCase3); CPPUNIT_TEST(testProperties); CPPUNIT_TEST_SUITE_END(); public: void setUp() { } void tearDown() { LogManager::shutdown(); } void testProperties() { LoggerPtr root = Logger::getRootLogger(); bool rootIsConfigured = !root->getAllAppenders().empty(); CPPUNIT_ASSERT(rootIsConfigured); AppenderList list = root->getAllAppenders(); AppenderPtr appender = list.front(); CPPUNIT_ASSERT(appender->getName() == _T("D3")); } }; CPPUNIT_TEST_SUITE_REGISTRATION(TestCase3); --- NEW FILE: Makefile.am --- EXTRA_DIST = *.cpp if TESTS noinst_LIBRARIES = libdefaultinit.a INCLUDES = -I$(top_srcdir)/include libdefaultinit_a_SOURCES = \ testcase1.cpp\ testcase2.cpp\ testcase3.cpp\ testcase4.cpp check: libdefaultinit.a endif --- NEW FILE: testcase2.cpp --- /* * 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. */ #include <log4cxx/config.h> #ifdef HAVE_XML #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <log4cxx/logmanager.h> #include <log4cxx/logger.h> using namespace log4cxx; class TestCase2 : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(TestCase2); CPPUNIT_TEST(xmlTest); CPPUNIT_TEST_SUITE_END(); public: void setUp() { } void tearDown() { LogManager::shutdown(); } void xmlTest() { LoggerPtr root = Logger::getRootLogger(); bool rootIsConfigured = !root->getAllAppenders().empty(); CPPUNIT_ASSERT(rootIsConfigured); AppenderList list = root->getAllAppenders(); AppenderPtr appender = list.front(); CPPUNIT_ASSERT(appender->getName() == _T("D1")); } }; CPPUNIT_TEST_SUITE_REGISTRATION(TestCase2); #endif //HAVE_XML |
From: Eric E. <eri...@us...> - 2006-05-25 11:41:58
|
Update of /cvsroot/objecthandler/log4cxx-0.9.7/tests/src/varia In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25784/tests/src/varia Added Files: Makefile.am errorhandlertestcase.cpp levelmatchfiltertestcase.cpp levelrangefiltertestcase.cpp Log Message: --- NEW FILE: levelrangefiltertestcase.cpp --- /* * 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. */ #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <log4cxx/logger.h> #include <log4cxx/simplelayout.h> #include <log4cxx/fileappender.h> #include <log4cxx/level.h> #include <log4cxx/varia/levelrangefilter.h> #include "../util/compare.h" using namespace log4cxx; using namespace log4cxx::helpers; using namespace log4cxx::varia; #define ACCEPT_FILE _T("output/LevelRangeFilter_accept") #define ACCEPT_WITNESS _T("witness/LevelRangeFilter_accept") #define NEUTRAL_FILE _T("output/LevelRangeFilter_neutral") #define NEUTRAL_WITNESS _T("witness/LevelMatchFilter_neutral") class LevelRangeFilterTestCase : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(LevelRangeFilterTestCase); CPPUNIT_TEST(accept); CPPUNIT_TEST(neutral); CPPUNIT_TEST_SUITE_END(); LoggerPtr root; LoggerPtr logger; public: void setUp() { root = Logger::getRootLogger(); root->removeAllAppenders(); logger = Logger::getLogger(_T("test")); } void tearDown() { root->getLoggerRepository()->resetConfiguration(); } void accept() { // set up appender LayoutPtr layout = new SimpleLayout(); AppenderPtr appender = new FileAppender(layout, ACCEPT_FILE, false); // create LevelMatchFilter LevelRangeFilterPtr rangeFilter = new LevelRangeFilter(); // set it to accept on a match rangeFilter->setAcceptOnMatch(true); // attach match filter to appender appender->addFilter(rangeFilter); // set appender on root and set level to debug root->addAppender(appender); root->setLevel(Level::DEBUG); int passCount = 0; StringBuffer sbuf; // test with no min or max set sbuf << _T("pass ") << passCount << _T("; no min or max set"); common(sbuf.str()); passCount++; // test with a min set rangeFilter->setLevelMin(Level::WARN); sbuf.str(_T("")); sbuf << _T("pass ") << passCount << _T("; min set to WARN, max not set"); common(sbuf.str()); passCount++; // create a clean filter appender->clearFilters(); rangeFilter = new LevelRangeFilter(); appender->addFilter(rangeFilter); //test with max set rangeFilter->setLevelMax(Level::WARN); sbuf.str(_T("")); sbuf << _T("pass ") << passCount << _T("; min not set, max set to WARN"); common(sbuf.str()); passCount++; LevelPtr levelArray[] = { Level::DEBUG, Level::INFO, Level::WARN, Level::ERROR, Level::FATAL }; int length = sizeof(levelArray)/sizeof(levelArray[0]); for (int x = 0; x < length; x++) { // set the min level to match rangeFilter->setLevelMin(levelArray[x]); for (int y = length - 1; y >= 0; y--) { // set max level to match rangeFilter->setLevelMax(levelArray[y]); sbuf.str(_T("")); sbuf << _T("pass ") << passCount << _T("; filter set to accept between ") << levelArray[x]->toString() << _T(" and ") << levelArray[y]->toString() << _T(" msgs"); common(sbuf.str()); // increment passCount passCount++; } } CPPUNIT_ASSERT(Compare::compare(ACCEPT_FILE, ACCEPT_WITNESS)); } void neutral() { // set up appender LayoutPtr layout = new SimpleLayout(); AppenderPtr appender = new FileAppender(layout, ACCEPT_FILE, false); // create LevelMatchFilter LevelRangeFilterPtr rangeFilter = new LevelRangeFilter(); // set it to accept on a match rangeFilter->setAcceptOnMatch(true); // attach match filter to appender appender->addFilter(rangeFilter); // set appender on root and set level to debug root->addAppender(appender); root->setLevel(Level::DEBUG); int passCount = 0; StringBuffer sbuf; // test with no min or max set sbuf << _T("pass ") << passCount << _T("; no min or max set"); common(sbuf.str()); passCount++; // test with a min set rangeFilter->setLevelMin(Level::WARN); sbuf.str(_T("")); sbuf << _T("pass ") << passCount << _T("; min set to WARN, max not set"); common(sbuf.str()); passCount++; // create a clean filter appender->clearFilters(); rangeFilter = new LevelRangeFilter(); appender->addFilter(rangeFilter); //test with max set rangeFilter->setLevelMax(Level::WARN); sbuf.str(_T("")); sbuf << _T("pass ") << passCount << _T("; min not set, max set to WARN"); common(sbuf.str()); passCount++; LevelPtr levelArray[] = { Level::DEBUG, Level::INFO, Level::WARN, Level::ERROR, Level::FATAL }; int length = sizeof(levelArray)/sizeof(levelArray[0]); for (int x = 0; x < length; x++) { // set the min level to match rangeFilter->setLevelMin(levelArray[x]); for (int y = length - 1; y >= 0; y--) { // set max level to match rangeFilter->setLevelMax(levelArray[y]); sbuf.str(_T("")); sbuf << _T("pass ") << passCount << _T("; filter set to accept between ") << levelArray[x]->toString() << _T(" and ") << levelArray[y]->toString() << _T(" msgs"); common(sbuf.str()); // increment passCount passCount++; } } CPPUNIT_ASSERT(Compare::compare(NEUTRAL_FILE, NEUTRAL_WITNESS)); } void common(const String& msg) { logger->debug(msg); logger->info(msg); logger->warn(msg); logger->error(msg); logger->fatal(msg); } }; CPPUNIT_TEST_SUITE_REGISTRATION(LevelRangeFilterTestCase); --- NEW FILE: Makefile.am --- EXTRA_DIST = *.cpp if TESTS noinst_LIBRARIES = libvaria.a INCLUDES = -I$(top_srcdir)/include libvaria_a_SOURCES = \ errorhandlertestcase.cpp \ levelmatchfiltertestcase.cpp \ levelrangefiltertestcase.cpp check: libvaria.a endif --- NEW FILE: levelmatchfiltertestcase.cpp --- /* * 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. */ #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <log4cxx/logger.h> #include <log4cxx/simplelayout.h> #include <log4cxx/fileappender.h> #include <log4cxx/level.h> #include <log4cxx/varia/levelmatchfilter.h> #include <log4cxx/varia/denyallfilter.h> #include "../util/compare.h" using namespace log4cxx; using namespace log4cxx::helpers; using namespace log4cxx::varia; #define ACCEPT_FILE _T("output/LevelMatchFilter_accept") #define ACCEPT_WITNESS _T("witness/LevelMatchFilter_accept") #define DENY_FILE _T("output/LevelMatchFilter_deny") #define DENY_WITNESS _T("witness/LevelMatchFilter_deny") class LevelMatchFilterTestCase : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(LevelMatchFilterTestCase); CPPUNIT_TEST(accept); CPPUNIT_TEST(deny); CPPUNIT_TEST_SUITE_END(); LoggerPtr root; LoggerPtr logger; public: void setUp() { root = Logger::getRootLogger(); root->removeAllAppenders(); logger = Logger::getLogger(_T("test")); } void tearDown() { root->getLoggerRepository()->resetConfiguration(); } void accept() { // set up appender LayoutPtr layout = new SimpleLayout(); AppenderPtr appender = new FileAppender(layout, ACCEPT_FILE, false); // create LevelMatchFilter LevelMatchFilterPtr matchFilter = new LevelMatchFilter(); // attach match filter to appender appender->addFilter(matchFilter); // attach DenyAllFilter to end of filter chain to deny neutral // (non matching) messages appender->addFilter(new DenyAllFilter()); // set appender on root and set level to debug root->addAppender(appender); root->setLevel(Level::DEBUG); LevelPtr levelArray[] = { Level::DEBUG, Level::INFO, Level::WARN, Level::ERROR, Level::FATAL }; int length = sizeof(levelArray)/sizeof(levelArray[0]); for (int x = 0; x < length; x++) { // set the level to match matchFilter->setLevelToMatch(levelArray[x]->toString()); StringBuffer sbuf; sbuf << _T("pass ") << x << _T("; filter set to accept only ") << levelArray[x]->toString() << _T(" msgs"); common(sbuf.str()); } CPPUNIT_ASSERT(Compare::compare(ACCEPT_FILE, ACCEPT_WITNESS)); } void deny() { // set up appender LayoutPtr layout = new SimpleLayout(); AppenderPtr appender = new FileAppender(layout, DENY_FILE, false); // create LevelMatchFilter, set to deny matches LevelMatchFilterPtr matchFilter = new LevelMatchFilter(); matchFilter->setAcceptOnMatch(false); // attach match filter to appender appender->addFilter(matchFilter); // set appender on root and set level to debug root->addAppender(appender); root->setLevel(Level::DEBUG); LevelPtr levelArray[] = { Level::DEBUG, Level::INFO, Level::WARN, Level::ERROR, Level::FATAL }; int length = sizeof(levelArray)/sizeof(levelArray[0]); for (int x = 0; x < length; x++) { // set the level to match matchFilter->setLevelToMatch(levelArray[x]->toString()); StringBuffer sbuf; sbuf << _T("pass ") << x << _T("; filter set to deny only ") << levelArray[x]->toString() << _T(" msgs"); common(sbuf.str()); } CPPUNIT_ASSERT(Compare::compare(DENY_FILE, DENY_WITNESS)); } void common(const String& msg) { logger->debug(msg); logger->info(msg); logger->warn(msg); logger->error(msg); logger->fatal(msg); } }; CPPUNIT_TEST_SUITE_REGISTRATION(LevelMatchFilterTestCase); --- NEW FILE: errorhandlertestcase.cpp --- /* * 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. */ #include <log4cxx/config.h> #ifdef HAVE_XML #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <log4cxx/logger.h> #include <log4cxx/xml/domconfigurator.h> #include "../util/transformer.h" #include "../util/compare.h" #include "../util/controlfilter.h" #include "../util/threadfilter.h" #include "../util/linenumberfilter.h" using namespace log4cxx; using namespace log4cxx::helpers; using namespace log4cxx::xml; #define TEMP _T("output/temp") #define FILTERED _T("output/filtered") #define TEST1_A_PAT _T("FALLBACK - test - Message \\d") #define TEST1_B_PAT _T("FALLBACK - root - Message \\d") #define TEST1_2_PAT \ _T("^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3} ") \ _T("\\[main]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - Message \\d") class ErrorHandlerTestCase : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ErrorHandlerTestCase); CPPUNIT_TEST(test1); CPPUNIT_TEST_SUITE_END(); LoggerPtr root; LoggerPtr logger; public: void setUp() { root = Logger::getRootLogger(); logger = Logger::getLogger(_T("test")); } void tearDown() { logger->getLoggerRepository()->resetConfiguration(); } void test1() { DOMConfigurator::configure(_T("input/xml/fallback1.xml")); common(); ControlFilter cf; cf << TEST1_A_PAT << TEST1_B_PAT << TEST1_2_PAT; ThreadFilter threadFilter; LineNumberFilter lineNumberFilter; std::vector<Filter *> filters; filters.push_back(&cf); filters.push_back(&threadFilter); filters.push_back(&lineNumberFilter); try { Transformer::transform(TEMP, FILTERED, filters); } catch(UnexpectedFormatException& e) { tcout << _T("UnexpectedFormatException :") << e.getMessage() << std::endl; throw; } CPPUNIT_ASSERT(Compare::compare(FILTERED, _T("witness/fallback"))); } 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_FATAL(logger, _T("Message ") << ++i); LOG4CXX_FATAL(root, _T("Message ") << i); } }; CPPUNIT_TEST_SUITE_REGISTRATION(ErrorHandlerTestCase); #endif //HAVE_XML |
From: Eric E. <eri...@us...> - 2006-05-25 11:41:58
|
Update of /cvsroot/objecthandler/log4cxx-0.9.7/tests/src/pattern In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25784/tests/src/pattern Added Files: Makefile.am num343patternconverter.cpp num343patternconverter.h patternparsertestcase.cpp Log Message: --- NEW FILE: num343patternconverter.h --- /* * 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. */ #include <log4cxx/helpers/patternconverter.h> namespace log4cxx { class Num343PatternConverter : public helpers::PatternConverter { public: void convert(ostream& sbuf, const spi::LoggingEventPtr& event); }; } --- NEW FILE: num343patternconverter.cpp --- /* * 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. */ #include "num343patternconverter.h" using namespace log4cxx; using namespace log4cxx::helpers; void Num343PatternConverter::convert(ostream& sbuf, const spi::LoggingEventPtr& event) { sbuf << _T("343"); } --- NEW FILE: Makefile.am --- EXTRA_DIST = $(top_srcdir)/tests/src/pattern/*.cpp noinst_HEADERS= $(top_srcdir)/tests/src/pattern/*.h if TESTS noinst_LIBRARIES = libpattern.a INCLUDES = -I$(top_srcdir)/include libpattern_a_SOURCES = \ num343patternconverter.cpp \ patternparsertestcase.cpp check: libpattern.a endif --- NEW FILE: patternparsertestcase.cpp --- /* * 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. */ #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <log4cxx/logger.h> #include <log4cxx/spi/loggingevent.h> #include <log4cxx/helpers/system.h> #include <log4cxx/level.h> #include "num343patternconverter.h" using namespace log4cxx; using namespace log4cxx::helpers; using namespace log4cxx::spi; class PatternParserTestCase : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(PatternParserTestCase); CPPUNIT_TEST_SUITE_END(); LoggerPtr logger; LoggingEventPtr event; long now; public: void setUp() { logger = Logger::getLogger(_T("org.foobar")); now = System::currentTimeMillis() + 13; event = new LoggingEvent( Logger::getStaticClass().getName(), logger, Level::INFO, _T("msg 1")); } void tearDown() { logger->getLoggerRepository()->resetConfiguration(); } }; CPPUNIT_TEST_SUITE_REGISTRATION(PatternParserTestCase); |
Update of /cvsroot/objecthandler/log4cxx-0.9.7/include/log4cxx/helpers In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25784/include/log4cxx/helpers Added Files: Makefile.am absolutetimedateformat.h appenderattachableimpl.h boundedfifo.h class.h condition.h criticalsection.h cyclicbuffer.h datagrampacket.h datagramsocket.h dateformat.h datelayout.h datetimedateformat.h event.h exception.h filewatchdog.h formattinginfo.h gnomexml.h inetaddress.h intializationutil.h iso8601dateformat.h loader.h locale.h loglog.h msxml.h mutex.h object.h objectimpl.h objectptr.h onlyonceerrorhandler.h optionconverter.h patternconverter.h patternparser.h properties.h propertyresourcebundle.h relativetimedateformat.h resourcebundle.h semaphore.h serversocket.h socket.h socketimpl.h socketinputstream.h socketoutputstream.h strictmath.h stringhelper.h stringtokenizer.h syslogwriter.h system.h tchar.h thread.h threadspecificdata.h timezone.h transform.h xml.h Log Message: --- NEW FILE: Makefile.am --- helpersincdir = $(includedir)/log4cxx/helpers helpersinc_HEADERS= $(top_srcdir)/include/log4cxx/helpers/*.h --- NEW FILE: datagrampacket.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_DATAGRAM_PACKET #define _LOG4CXX_HELPERS_DATAGRAM_PACKET #include <log4cxx/helpers/objectimpl.h> #include <log4cxx/helpers/objectptr.h> #include <log4cxx/helpers/inetaddress.h> namespace log4cxx { namespace helpers { class DatagramPacket; typedef helpers::ObjectPtrT<DatagramPacket> DatagramPacketPtr; /** This class represents a datagram packet. <p>Datagram packets are used to implement a connectionless packet delivery service. Each message is routed from one machine to another based solely on information contained within that packet. Multiple packets sent from one machine to another might be routed differently, and might arrive in any order. */ class LOG4CXX_EXPORT DatagramPacket : public helpers::ObjectImpl { protected: /** the data for this packet. */ void * buf; /** The offset of the data for this packet. */ int offset; /** The length of the data for this packet. */ int length; /** The IP address for this packet. */ InetAddress address; /** The UDP port number of the remote host. */ int port; public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(DatagramPacket) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(DatagramPacket) END_LOG4CXX_CAST_MAP() /** Constructs a DatagramPacket for receiving packets of length <code>length</code>. */ DatagramPacket(void * buf, int length); /** Constructs a datagram packet for sending packets of length <code>length</code> to the specified port number on the specified host. */ DatagramPacket(void * buf, int length, InetAddress address, int port); /** Constructs a DatagramPacket for receiving packets of length <code>length</code>, specifying an offset into the buffer. */ DatagramPacket(void * buf, int offset, int length); /** Constructs a datagram packet for sending packets of length <code>length</code> with offset <code>offset</code> to the specified port number on the specified host. */ DatagramPacket(void * buf, int offset, int length, InetAddress address, int port); ~DatagramPacket(); /** Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received. */ inline InetAddress getAddress() const { return address; } /** Returns the data received or the data to be sent. */ inline void * getData() const { return buf; } /** Returns the length of the data to be sent or the length of the data received. */ inline int getLength() const { return length; } /** Returns the offset of the data to be sent or the offset of the data received. */ inline int getOffset() const { return offset; } /** Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received. */ inline int getPort() const { return port; } inline void setAddress(InetAddress address) { this->address = address; } /** Set the data buffer for this packet. */ inline void setData(void * buf) { this->buf = buf; } /** Set the data buffer for this packet. */ inline void setData(void * buf, int offset, int length) { this->buf = buf; this->offset = offset; this->length = length; } /** Set the length for this packet. */ inline void setLength(int length) { this->length = length; } inline void setPort(int port) { this->port = port; } }; // class DatagramSocketImpl } // namespace helpers }; // namespace log4cxx #endif // _LOG4CXX_HELPERS_DATAGRAM_SOCKET_IMPL --- NEW FILE: objectptr.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_OBJECT_PTR_H #define _LOG4CXX_HELPERS_OBJECT_PTR_H #include <log4cxx/helpers/exception.h> namespace log4cxx { namespace helpers { /** smart pointer to a Object descendant */ template<typename T> class ObjectPtrT { public: template<typename InterfacePtr> ObjectPtrT(const InterfacePtr& p) : p(0) { cast(p); } // Disable conversion using ObjectPtrT* specialization of // template<typename InterfacePtr> ObjectPtrT(const InterfacePtr& p) /* template<> explicit ObjectPtrT(ObjectPtrT* const & p) throw(IllegalArgumentException) { if (p == 0) { throw IllegalArgumentException(String()); } else { this->p = p->p; this->p->addRef(); } }*/ ObjectPtrT(const int& null) //throw(IllegalArgumentException) : p(0) { if (null != 0) { throw IllegalArgumentException(String()); } } ObjectPtrT() : p(0) { } ObjectPtrT(T * p) : p(p) { if (this->p != 0) { this->p->addRef(); } } ObjectPtrT(const ObjectPtrT& p) : p(p.p) { if (this->p != 0) { this->p->addRef(); } } ~ObjectPtrT() { if (this->p != 0) { this->p->releaseRef(); } } // Operators template<typename InterfacePtr> ObjectPtrT& operator=(const InterfacePtr& p) { cast(p); return *this; } ObjectPtrT& operator=(const ObjectPtrT& p) { if (this->p != p.p) { if (this->p != 0) { this->p->releaseRef(); } this->p = p.p; if (this->p != 0) { this->p->addRef(); } } return *this; } ObjectPtrT& operator=(const int& null) //throw(IllegalArgumentException) { if (null != 0) { throw IllegalArgumentException(String()); } if (this->p != 0) { this->p->releaseRef(); this->p = 0; } return *this; } ObjectPtrT& operator=(T* p) { if (this->p != p) { if (this->p != 0) { this->p->releaseRef(); } this->p = p; if (this->p != 0) { this->p->addRef(); } } return *this; } bool operator==(const ObjectPtrT& p) const { return (this->p == p.p); } bool operator!=(const ObjectPtrT& p) const { return (this->p != p.p); } bool operator==(const T* p) const { return (this->p == p); } bool operator!=(const T* p) const { return (this->p != p); } T* operator->() {return p; } const T* operator->() const {return p; } T& operator*() const {return *p; } operator T*() const {return p; } template<typename InterfacePtr> void cast(const InterfacePtr& p) { if (this->p != 0) { this->p->releaseRef(); this->p = 0; } if (p != 0) { this->p = (T*)p->cast(T::getStaticClass()); if (this->p != 0) { this->p->addRef(); } } } public: T * p; }; } } #endif //_LOG4CXX_HELPERS_OBJECT_PTR_H --- NEW FILE: msxml.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_MSXML_H #define _LOG4CXX_HELPERS_MSXML_H #include <log4cxx/config.h> #ifdef HAVE_MS_XML #include <log4cxx/helpers/xml.h> #include <log4cxx/helpers/objectimpl.h> //#ifndef __IXMLDOMDocument_FWD_DEFINED__ #import "msxml.dll" //#endif namespace log4cxx { namespace helpers { class LOG4CXX_EXPORT MsXMLDOMNode : virtual public XMLDOMNode, virtual public ObjectImpl { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(MsXMLDOMNode) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(XMLDOMNode) END_LOG4CXX_CAST_MAP() MsXMLDOMNode(MSXML::IXMLDOMNodePtr node); virtual XMLDOMNodeListPtr getChildNodes(); virtual XMLDOMNodeType getNodeType() { return NOT_IMPLEMENTED_NODE; } virtual XMLDOMDocumentPtr getOwnerDocument(); protected: MSXML::IXMLDOMNodePtr node; }; class LOG4CXX_EXPORT MsXMLDOMDocument : virtual public XMLDOMDocument, virtual public ObjectImpl { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(MsXMLDOMDocument) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(XMLDOMDocument) LOG4CXX_CAST_ENTRY(XMLDOMNode) END_LOG4CXX_CAST_MAP() MsXMLDOMDocument(); MsXMLDOMDocument(MSXML::IXMLDOMDocumentPtr document); ~MsXMLDOMDocument(); virtual XMLDOMNodeListPtr getChildNodes(); virtual XMLDOMNodeType getNodeType() { return XMLDOMNode::DOCUMENT_NODE; } virtual XMLDOMDocumentPtr getOwnerDocument(); virtual void load(const String& fileName); virtual XMLDOMElementPtr getDocumentElement(); virtual XMLDOMElementPtr getElementById(const String& tagName, const String& elementId); protected: MSXML::IXMLDOMDocumentPtr document; bool mustCallCoUninitialize; }; class LOG4CXX_EXPORT MsXMLDOMElement : virtual public XMLDOMElement, virtual public ObjectImpl { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(MsXMLDOMElement) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(XMLDOMElement) LOG4CXX_CAST_ENTRY(XMLDOMNode) END_LOG4CXX_CAST_MAP() MsXMLDOMElement(MSXML::IXMLDOMElementPtr element); virtual XMLDOMNodeListPtr getChildNodes(); virtual XMLDOMNodeType getNodeType() { return XMLDOMNode::ELEMENT_NODE; } virtual XMLDOMDocumentPtr getOwnerDocument(); virtual String getTagName(); virtual String getAttribute(const String& name); protected: MSXML::IXMLDOMElementPtr element; }; class LOG4CXX_EXPORT MsXMLDOMNodeList : virtual public XMLDOMNodeList, virtual public ObjectImpl { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(MsXMLDOMNodeList) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(XMLDOMNodeList) END_LOG4CXX_CAST_MAP() MsXMLDOMNodeList(MSXML::IXMLDOMNodeListPtr nodeList); virtual int getLength(); virtual XMLDOMNodePtr item(int index); protected: MSXML::IXMLDOMNodeListPtr nodeList; }; } // namespace helpers }; // namespace log4cxx #endif // HAVE_MS_XML #endif // _LOG4CXX_HELPERS_MSXML_H --- NEW FILE: filewatchdog.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_FILEWATCHDOG_H #define _LOG4CXX_HELPERS_FILEWATCHDOG_H #include <log4cxx/helpers/tchar.h> #include <log4cxx/helpers/thread.h> #include <time.h> namespace log4cxx { namespace helpers { /** Check every now and then that a certain file has not changed. If it has, then call the #doOnChange method. */ class LOG4CXX_EXPORT FileWatchdog : public Thread { public: /** The default delay between every file modification check, set to 60 seconds. */ static long DEFAULT_DELAY /*= 60000*/; protected: /** The name of the file to observe for changes. */ String filename; /** The delay to observe between every check. By default set DEFAULT_DELAY.*/ long delay; time_t lastModif; bool warnedAlready; bool interrupted; protected: FileWatchdog(const String& filename); virtual void doOnChange() = 0; void checkAndConfigure(); public: /** Set the delay to observe between each check of the file changes. */ void setDelay(long delay) { this->delay = delay; } void run(); void start(); }; } // namespace helpers }; // namespace log4cxx #endif // _LOG4CXX_HELPERS_FILEWATCHDOG_H --- NEW FILE: propertyresourcebundle.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_PROPERTY_RESOURCE_BUNDLE_H #define _LOG4CXX_HELPERS_PROPERTY_RESOURCE_BUNDLE_H #include <log4cxx/helpers/resourcebundle.h> #include <log4cxx/helpers/properties.h> namespace log4cxx { namespace helpers { class PropertyResourceBundle; typedef ObjectPtrT<PropertyResourceBundle> PropertyResourceBundlePtr; /** PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file. */ class LOG4CXX_EXPORT PropertyResourceBundle : public ResourceBundle { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(PropertyResourceBundle) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(PropertyResourceBundle) LOG4CXX_CAST_ENTRY_CHAIN(ResourceBundle) END_LOG4CXX_CAST_MAP() /** Creates a property resource bundle. @param inStream property file to read from. @throw IOException if an error occurred when reading from the input stream. */ PropertyResourceBundle(istream& inStream); virtual String getString(const String& key) const; protected: Properties properties; }; // class PropertyResourceBundle } // namespace helpers }; // namespace log4cxx #endif // _LOG4CXX_HELPERS_PROPERTY_RESOURCE_BUNDLE_H --- NEW FILE: system.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_SYSTEM_H #define _LOG4CXX_HELPERS_SYSTEM_H #include <log4cxx/config.h> #include <log4cxx/helpers/tchar.h> #include <log4cxx/helpers/exception.h> namespace log4cxx { namespace helpers { class Properties; /** The System class contains several useful class fields and methods. It cannot be instantiated. */ class LOG4CXX_EXPORT System { public: /** Returns the current time in milliseconds since midnight (0 hour), January 1, 1970. Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds. @return the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. */ static int64_t currentTimeMillis(); /** Gets the system property indicated by the specified key. @param key the name of the system property. @return the string value of the system property, or the default value if there is no property with that key. @throws IllegalArgumentException if key is empty. */ static String getProperty(const String& key); /** Sets the system property indicated by the specified key. @param key the name of the system property. @param value the value of the system property. @throws IllegalArgumentException if key is empty. */ static void setProperty(const String& key, const String& value); static void setProperties(const Properties& props); }; } // namespace helpers }; // namespace log4cxx #endif //_LOG4CXX_HELPERS_SYSTEM_H --- NEW FILE: resourcebundle.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_RESOURCE_BUNDLE_H #define _LOG4CXX_HELPERS_RESOURCE_BUNDLE_H #include <log4cxx/helpers/objectimpl.h> #include <log4cxx/helpers/objectptr.h> #include <log4cxx/helpers/exception.h> #include <log4cxx/helpers/locale.h> namespace log4cxx { namespace helpers { class LOG4CXX_EXPORT MissingResourceException : public Exception { }; class ResourceBundle; typedef ObjectPtrT<ResourceBundle> ResourceBundlePtr; /** Resource bundles contain locale-specific objects */ class LOG4CXX_EXPORT ResourceBundle : public ObjectImpl { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(ResourceBundle) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(ResourceBundle) END_LOG4CXX_CAST_MAP() /** Gets a string for the given key from this resource bundle or one of its parents. Calling this method is equivalent to calling @param key the key for the desired string @return the string for the given key @throw MissingResourceException - if no object for the given key can be found */ virtual String getString(const String& key) const = 0; /** Gets a resource bundle using the specified base name and locale @param baseName the base name of the resource bundle, a fully qualified class name or property filename @param locale the locale for which a resource bundle is desired */ static ResourceBundlePtr getBundle(const String& baseName, const Locale& locale); protected: /* Sets the parent bundle of this bundle. The parent bundle is searched by #getString when this bundle does not contain a particular resource. Parameters: parent - this bundle's parent bundle. */ inline void setParent(const ResourceBundlePtr& parent) { this->parent = parent; } /** The parent bundle of this bundle. The parent bundle is searched by #getString when this bundle does not contain a particular resource. */ ResourceBundlePtr parent; }; // class ResourceBundle } // namespace helpers }; // namespace log4cxx #endif --- NEW FILE: gnomexml.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_GNOMEXML_H #define _LOG4CXX_HELPERS_GNOMEXML_H #include <log4cxx/config.h> #ifdef HAVE_LIBXML2 #include <log4cxx/helpers/xml.h> #include <log4cxx/helpers/objectimpl.h> #include <libxml/tree.h> namespace log4cxx { namespace helpers { class GnomeXMLDOMNode : virtual public XMLDOMNode, virtual public ObjectImpl { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(GnomeXMLDOMNode) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(XMLDOMNode) END_LOG4CXX_CAST_MAP() GnomeXMLDOMNode(xmlNodePtr node); virtual XMLDOMNodeListPtr getChildNodes(); virtual XMLDOMNodeType getNodeType() { return NOT_IMPLEMENTED_NODE; } virtual XMLDOMDocumentPtr getOwnerDocument(); protected: xmlNodePtr node; }; class GnomeXMLDOMDocument : virtual public XMLDOMDocument, virtual public ObjectImpl { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(GnomeXMLDOMDocument) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(XMLDOMDocument) LOG4CXX_CAST_ENTRY(XMLDOMNode) END_LOG4CXX_CAST_MAP() GnomeXMLDOMDocument(); GnomeXMLDOMDocument(xmlDocPtr document); ~GnomeXMLDOMDocument(); virtual XMLDOMNodeListPtr getChildNodes(); virtual XMLDOMNodeType getNodeType() { return XMLDOMNode::DOCUMENT_NODE; } virtual XMLDOMDocumentPtr getOwnerDocument(); virtual void load(const String& fileName); virtual XMLDOMElementPtr getDocumentElement(); virtual XMLDOMElementPtr getElementById( const String& tagName, const String& elementId); protected: xmlDocPtr document; bool ownDocument; }; class GnomeXMLDOMElement : virtual public XMLDOMElement, virtual public ObjectImpl { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(GnomeXMLDOMElement) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(XMLDOMElement) LOG4CXX_CAST_ENTRY(XMLDOMNode) END_LOG4CXX_CAST_MAP() GnomeXMLDOMElement(xmlNodePtr element); virtual XMLDOMNodeListPtr getChildNodes(); virtual XMLDOMNodeType getNodeType() { return XMLDOMNode::ELEMENT_NODE; } virtual XMLDOMDocumentPtr getOwnerDocument(); virtual String getTagName(); virtual String getAttribute(const String& name); protected: xmlNodePtr element; }; class GnomeXMLDOMNodeList : virtual public XMLDOMNodeList, virtual public ObjectImpl { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(GnomeXMLDOMNodeList) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(XMLDOMNodeList) END_LOG4CXX_CAST_MAP() GnomeXMLDOMNodeList(xmlNodePtr firstChild); virtual int getLength(); virtual XMLDOMNodePtr item(int index); protected: xmlNodePtr firstChild; xmlNodePtr currentChild; int currentIndex; }; } // namespace helpers }; // namespace log4cxx #endif // HAVE_LIBXML2 #endif // _LOG4CXX_HELPERS_MSXML_H --- NEW FILE: datelayout.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_DATE_LAYOUT_H #define _LOG4CXX_HELPERS_DATE_LAYOUT_H #include <log4cxx/layout.h> namespace log4cxx { namespace helpers { class DateFormat; class TimeZone; typedef helpers::ObjectPtrT<TimeZone> TimeZonePtr; /** This abstract layout takes care of all the date related options and formatting work. */ class LOG4CXX_EXPORT DateLayout : public Layout { public: /** String constant designating no time information. Current value of this constant is <b>NULL</b>. */ static String NULL_DATE_FORMAT; /** String constant designating relative time. Current value of this constant is <b>RELATIVE</b>. */ static String RELATIVE_TIME_DATE_FORMAT; static String DATE_FORMAT_OPTION; static String TIMEZONE_OPTION; private: String timeZoneID; String dateFormatOption; protected: DateFormat * dateFormat; public: DateLayout(); virtual ~DateLayout(); virtual void activateOptions(); virtual void setOption(const String& option, const String& value); /** The value of the <b>DateFormat</b> option should be either an argument to the constructor of helpers::DateFormat or one of the srings <b>"NULL"</b>, <b>"RELATIVE"</b>, <b>"ABSOLUTE"</b>, <b>"DATE"</b> or <b>"ISO8601</b>. */ inline void setDateFormat(const String& dateFormat) { this->dateFormatOption = dateFormat; } /** Returns value of the <b>DateFormat</b> option. */ inline const String& getDateFormat() const { return dateFormatOption; } /** The <b>TimeZoneID</b> option is a time zone ID string in the format expected by the <code>locale</code> C++ standard class. */ inline void setTimeZone(const String& timeZone) { this->timeZoneID = timeZone; } /** Returns value of the <b>TimeZone</b> option. */ inline const String& getTimeZone() const { return timeZoneID; } void formatDate(ostream &os, const spi::LoggingEventPtr& event) const; protected: /** Sets the DateFormat used to format date and time in the time zone determined by <code>timeZone</code> parameter. The helpers::DateFormat DateFormat used will depend on the <code>dateFormatType</code>. <p>The recognized types are #NULL_DATE_FORMAT, #RELATIVE_TIME_DATE_FORMAT, helpers::AbsoluteTimeDateFormat#ABS_TIME_DATE_FORMAT, helpers::AbsoluteTimeDateFormat#DATE_AND_TIME_DATE_FORMAT and helpers::AbsoluteTimeDateFormat#ISO8601_DATE_FORMAT. If the <code>dateFormatType</code> is not one of the above, then the argument is assumed to be a date pattern for helpers::DateFormat. */ void setDateFormat(const String& dateFormatType, const TimeZonePtr& timeZone); }; } // namespace helpers }; // namespace log4cxx #endif // _LOG4CXX_HELPERS_DATE_LAYOUT_H --- NEW FILE: relativetimedateformat.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_RELATIVE_TIME_DATE_FORMAT_H #define _LOG4CXX_HELPERS_RELATIVE_TIME_DATE_FORMAT_H #include <log4cxx/helpers/dateformat.h> #include <log4cxx/helpers/system.h> namespace log4cxx { namespace helpers { /** Formats a date by printing the number of seconds elapsed since the start of the application. This is the fastest printing DateFormat in the package. */ class LOG4CXX_EXPORT RelativeTimeDateFormat : public DateFormat { protected: int64_t startTime; public: RelativeTimeDateFormat() : DateFormat(_T(""), 0), startTime(System::currentTimeMillis()) { } virtual void format(ostream& os, int64_t time) const { os << (time - startTime); } }; } // namespace helpers }; // namespace log4cxx #endif // _LOG4CXX_HELPERS_RELATIVE_TIME_DATE_FORMAT_H --- NEW FILE: class.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_CLASS_H #define _LOG4CXX_HELPERS_CLASS_H #include <log4cxx/helpers/tchar.h> #include <log4cxx/helpers/objectptr.h> namespace log4cxx { namespace helpers { class Object; typedef ObjectPtrT<Object> ObjectPtr; /** Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class. */ class LOG4CXX_EXPORT InstantiationException : public Exception { public: InstantiationException() : Exception(_T("Abstract class")) {} }; /** Thrown when an application tries to load in a class through its string name but no definition for the class with the specified name could be found. */ class LOG4CXX_EXPORT ClassNotFoundException : public Exception { public: ClassNotFoundException(const String& className); }; class LOG4CXX_EXPORT Class { public: Class(const String& name); virtual ~Class () {} virtual ObjectPtr newInstance() const; const String& toString() const; const String& getName() const; static const Class& forName(const String& className); protected: static void registerClass(const Class * newClass); String name; }; } // namespace log4cxx }; // namespace helper #endif //_LOG4CXX_HELPERS_CLASS_H --- NEW FILE: criticalsection.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_CRITICAL_SECTION_H #define _LOG4CXX_HELPERS_CRITICAL_SECTION_H #include <log4cxx/config.h> #ifdef HAVE_PTHREAD #include <pthread.h> #elif defined(HAVE_MS_THREAD) #include <windows.h> #endif namespace log4cxx { namespace helpers { class LOG4CXX_EXPORT CriticalSection { public: CriticalSection(); ~CriticalSection(); void lock(); void unlock(); unsigned long getOwningThread(); #ifdef HAVE_PTHREAD pthread_mutex_t mutex; #elif defined(HAVE_MS_THREAD) CRITICAL_SECTION mutex; #endif unsigned long owningThread; }; /** CriticalSection helper class to be used on call stack */ class WaitAccess { public: /// lock a critical section WaitAccess(CriticalSection& cs) : cs(cs) { cs.lock(); locked = true; } /** automatically unlock the critical section if unlock has not be called. */ ~WaitAccess() { if (locked) { unlock(); } } /// unlock the critical section void unlock() { cs.unlock(); locked = false; } private: /// the CriticalSection to be automatically unlocked CriticalSection& cs; /// verify the CriticalSection state bool locked; }; } // namespace helpers }; // namespace log4cxx #endif //_LOG4CXX_HELPERS_CRITICAL_SECTION_H --- NEW FILE: transform.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_TRANSFORM_H #define _LOG4CXX_HELPERS_TRANSFORM_H #include <log4cxx/helpers/tchar.h> namespace log4cxx { namespace helpers { /** Utility class for transforming strings. */ class LOG4CXX_EXPORT Transform { private: static String CDATA_START; static String CDATA_END; static String CDATA_PSEUDO_END; static String CDATA_EMBEDED_END; static String::size_type CDATA_END_LEN; public: /** * This method takes a string which may contain HTML tags (ie, * <b>, <table>, etc) and replaces any '<' and '>' * characters with respective predefined entity references. * * @param buf output stream where to write the modified string. * @param input The text to be converted. * @return The input string with the characters '<' and '>' replaced with * &lt; and &gt; respectively. * */ static void appendEscapingTags( ostream& buf, const String& input); /** * Ensures that embeded CDEnd strings (]]>) are handled properly * within message, NDC and throwable tag text. * * @param buf output stream holding the XML data to this point. The * initial CDStart (<![CDATA[) and final CDEnd (]]>) of the CDATA * section are the responsibility of the calling method. * @param input The String that is inserted into an existing CDATA * Section within buf. */ static void appendEscapingCDATA( ostream& buf, const String& input); }; // class Transform } // namespace helpers }; //namespace log4cxx #endif // _LOG4CXX_HELPERS_TRANSFORM_H --- NEW FILE: socketoutputstream.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_SOCKET_OUTPUT_STREAM_H #define _LOG4CXX_HELPERS_SOCKET_OUTPUT_STREAM_H #include <log4cxx/helpers/tchar.h> #include <log4cxx/helpers/objectimpl.h> #include <log4cxx/helpers/objectptr.h> namespace log4cxx { namespace helpers { class Socket; typedef ObjectPtrT<Socket> SocketPtr; class SocketOutputStream; typedef ObjectPtrT<SocketOutputStream> SocketOutputStreamPtr; class LOG4CXX_EXPORT SocketOutputStream : public ObjectImpl { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(SocketOutputStream) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(SocketOutputStream) END_LOG4CXX_CAST_MAP() SocketOutputStream(SocketPtr socket); ~SocketOutputStream(); void write(const void * buffer, size_t len); void write(unsigned int value); void write(int value); void write(unsigned long value); void write(long value); void write(const String& value); // some write functions are missing ... /** Close the stream and dereference the socket. */ void close(); /** Flushes this output stream and forces any buffered output bytes to be written out. */ void flush(); protected: SocketPtr socket; /** memory stream buffer */ /* class membuf : public std::basic_streambuf<char, std::char_traits<char> > { public: const void * buffer() const; const size_t size() const; }*/ unsigned char * beg, * cur, * end; }; } // namespace helpers }; // namespace log4cxx #endif // _LOG4CXX_HELPERS_SOCKET_OUTPUT_STREAM_H --- NEW FILE: iso8601dateformat.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_ISO_8601_DATE_FORMAT_H #define _LOG4CXX_HELPERS_ISO_8601_DATE_FORMAT_H #include <log4cxx/helpers/dateformat.h> namespace log4cxx { namespace helpers { /** Formats a date in the format <b>\%Y-\%m-\%d \%H:\%M:\%S,\%Q</b> for example "1999-11-27 15:49:37,459". <p>Refer to the <a href=http://www.cl.cam.ac.uk/~mgk25/iso-time.html>summary of the International Standard Date and Time Notation</a> for more information on this format. */ class LOG4CXX_EXPORT ISO8601DateFormat : public DateFormat { public: ISO8601DateFormat(const TimeZonePtr& timeZone) : DateFormat(_T("%Y-%m-%d %H:%M:%S,%Q"), timeZone) {} }; } // namespace helpers }; // namespace log4cxx #endif // _LOG4CXX_HELPERS_ISO_8601_DATE_FORMAT_H --- NEW FILE: syslogwriter.h --- /* * 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. */ #include <log4cxx/helpers/objectptr.h> #include <log4cxx/helpers/inetaddress.h> namespace log4cxx { namespace helpers { class DatagramSocket; typedef helpers::ObjectPtrT<DatagramSocket> DatagramSocketPtr; /** SyslogWriter is a wrapper around the DatagramSocket class it writes text to the specified host on the port 514 (UNIX syslog) */ class LOG4CXX_EXPORT SyslogWriter { public: SyslogWriter(const String& syslogHost); void write(const String& string); private: String syslogHost; InetAddress address; DatagramSocketPtr ds; }; } // namespace helpers }; // namespace log4cxx --- NEW FILE: exception.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_EXCEPTION_H #define _LOG4CXX_HELPERS_EXCEPTION_H #include <log4cxx/helpers/tchar.h> namespace log4cxx { namespace helpers { /** The class Exception and its subclasses indicate conditions that a reasonable application might want to catch. */ class LOG4CXX_EXPORT Exception { public: Exception() {} Exception(const String& message): message(message) {} inline const String& getMessage() { return message; } protected: String message; }; // class Exception /** RuntimeException is the parent class of those exceptions that can be thrown during the normal operation of the process. */ class LOG4CXX_EXPORT RuntimeException : public Exception { public: RuntimeException() {} RuntimeException(const String& message) : Exception(message) {} }; // class RuntimeException /** Thrown when an application attempts to use null in a case where an object is required. */ class LOG4CXX_EXPORT NullPointerException : public RuntimeException { public: NullPointerException() {} NullPointerException(const String& message) : RuntimeException(message) {} }; // class NullPointerException /** Thrown to indicate that a method has been passed an illegal or inappropriate argument.*/ class LOG4CXX_EXPORT IllegalArgumentException : public RuntimeException { public: IllegalArgumentException(const String& message) : RuntimeException(message) {} }; // class IllegalArgumentException /** Signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations. */ class LOG4CXX_EXPORT IOException : public Exception { }; } // namespace helpers }; // namespace log4cxx #endif // _LOG4CXX_HELPERS_EXCEPTION_H --- NEW FILE: cyclicbuffer.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_CYCLICBUFFER_H #define _LOG4CXX_HELPERS_CYCLICBUFFER_H #include <log4cxx/spi/loggingevent.h> #include <vector> namespace log4cxx { namespace helpers { /** CyclicBuffer is used by other appenders to hold {@link spi::LoggingEvent LoggingEvents} for immediate or differed display. <p>This buffer gives read access to any element in the buffer not just the first or last element. */ class LOG4CXX_EXPORT CyclicBuffer { std::vector<spi::LoggingEventPtr> ea; int first; int last; int numElems; int maxSize; public: /** Instantiate a new CyclicBuffer of at most <code>maxSize</code> events. The <code>maxSize</code> argument must a positive integer. @param maxSize The maximum number of elements in the buffer. @throws IllegalArgumentException if <code>maxSize</code> is negative. */ CyclicBuffer(int maxSize); ~CyclicBuffer(); /** Add an <code>event</code> as the last event in the buffer. */ void add(const spi::LoggingEventPtr& event); /** Get the <i>i</i>th oldest event currently in the buffer. If <em>i</em> is outside the range 0 to the number of elements currently in the buffer, then <code>null</code> is returned. */ spi::LoggingEventPtr get(int i); int getMaxSize() const { return maxSize; } /** Get the oldest (first) element in the buffer. The oldest element is removed from the buffer. */ spi::LoggingEventPtr get(); /** Get the number of elements in the buffer. This number is guaranteed to be in the range 0 to <code>maxSize</code> (inclusive). */ int length() const { return numElems; } /** Resize the cyclic buffer to <code>newSize</code>. @throws IllegalArgumentException if <code>newSize</code> is negative. */ void resize(int newSize); }; // class CyclicBuffer } //namespace helpers }; //namespace log4cxx #endif //_LOG4CXX_HELPERS_CYCLICBUFFER_H --- NEW FILE: timezone.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_TIMEZONE_H #define _LOG4CXX_HELPERS_TIMEZONE_H #include <log4cxx/config.h> #include <log4cxx/helpers/tchar.h> #include <log4cxx/helpers/objectimpl.h> #include <log4cxx/helpers/objectptr.h> #include <map> namespace log4cxx { namespace helpers { class TimeZone; typedef helpers::ObjectPtrT<TimeZone> TimeZonePtr; class LOG4CXX_EXPORT TimeZone : public helpers::ObjectImpl { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(TimeZone) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(TimeZone) END_LOG4CXX_CAST_MAP() TimeZone(const String& ID); ~TimeZone(); /** Returns the offset of this time zone from UTC at the specified date. If Daylight Saving Time is in effect at the specified date, the offset value is adjusted with the amount of daylight saving. @param date the date represented in milliseconds since January 1, 1970 00:00:00 GMT @return the amount of time in milliseconds to add to UTC to get local time. */ int getOffset(int64_t date) const; static TimeZonePtr getDefault(); static TimeZonePtr getTimeZone(const String& ID); /** Queries if the given date is in daylight savings time in this time zone. @param date the given Date. @return true if the given date is in daylight savings time, false, otherwise. */ bool inDaylightTime(int64_t date) const; /** Returns the amount of time to be added to local standard time to get local wall clock time. @return the amount of saving time in milliseconds */ inline int getDSTSavings() const { return DSTSavings; } /** Returns the amount of time in milliseconds to add to UTC to get standard time in this time zone. Because this value is not affected by daylight saving time, it is called raw offset. @return the amount of raw offset time in milliseconds to add to UTC. */ inline int getRawOffset() const { return rawOffset; } /** Queries if this time zone uses daylight savings time. @return true if this time zone uses daylight savings time, false, otherwise. */ inline bool useDaylightTime() const { return DSTSavings != 0; } protected: String ID; int rawOffset; int DSTSavings; class Rule { public: Rule(int year); int year; int64_t startDate; int64_t endDate; }; typedef std::map<long, Rule *> RuleMap; mutable RuleMap rules; static TimeZonePtr defaultTimeZone; }; } } #endif //_LOG4CXX_HELPERS_TIMEZONE_H --- NEW FILE: socketinputstream.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_SOCKET_INPUT_STREAM_H #define _LOG4CXX_HELPERS_SOCKET_INPUT_STREAM_H #include <log4cxx/helpers/tchar.h> #include <log4cxx/helpers/objectimpl.h> #include <log4cxx/helpers/objectptr.h> #include <log4cxx/helpers/exception.h> namespace log4cxx { namespace helpers { class Socket; typedef ObjectPtrT<Socket> SocketPtr; class SocketInputStream; typedef ObjectPtrT<SocketInputStream> SocketInputStreamPtr; class LOG4CXX_EXPORT EOFException : public Exception { }; class LOG4CXX_EXPORT SocketInputStream : public ObjectImpl { private: static size_t DEFAULT_BUFFER_SIZE; public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(SocketInputStream) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(SocketInputStream) END_LOG4CXX_CAST_MAP() SocketInputStream(SocketPtr socket); SocketInputStream(SocketPtr socket, size_t bufferSize); ~SocketInputStream(); void read(void * buffer, size_t len) const; void read(unsigned int &value) const; void read(int &value) const; void read(unsigned long &value) const; void read(long &value) const; void read(String& value) const; // some read functions are missing ... /** Close the stream and dereference the socket. */ void close(); protected: SocketPtr socket; size_t bufferSize; unsigned char * memBuffer; size_t currentPos; size_t maxPos; }; } // namespace helpers }; // namespace log4cxx #endif // _LOG4CXX_HELPERS_SOCKET_OUTPUT_STREAM_H --- NEW FILE: socketimpl.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_SOCKET_IMPL #define _LOG4CXX_HELPERS_SOCKET_IMPL #include <log4cxx/helpers/objectimpl.h> #include <log4cxx/helpers/objectptr.h> #include <log4cxx/helpers/inetaddress.h> #include <log4cxx/helpers/exception.h> namespace log4cxx { namespace helpers { /** Thrown to indicate that there is an error in the underlying protocol, such as a TCP error. */ class LOG4CXX_EXPORT SocketException : public IOException { public: SocketException(); }; /** Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the connection was refused remotely (e.g., no process is listening on the remote address/port). */ class LOG4CXX_EXPORT ConnectException : public SocketException { }; /** Signals that an error occurred while attempting to bind a socket to a local address and port. Typically, the port is in use, or the requested local address could not be assigned. */ class LOG4CXX_EXPORT BindException : public SocketException { }; /** Signals that an I/O operation has been interrupted. An InterruptedIOException is thrown to indicate that an input or output transfer has been terminated because the thread performing it was interrupted. The field bytesTransferred indicates how many bytes were successfully transferred before the interruption occurred. */ class LOG4CXX_EXPORT InterruptedIOException : public IOException { }; /** Signals that a timeout has occurred on a socket read or accept. */ class LOG4CXX_EXPORT SocketTimeoutException : public InterruptedIOException { }; class SocketImpl; typedef helpers::ObjectPtrT<SocketImpl> SocketImplPtr; /** @brief Default Socket Implementation. This implementation does not implement any security check. */ class LOG4CXX_EXPORT SocketImpl : public helpers::ObjectImpl { protected: /** The IP address of the remote end of this socket. */ InetAddress address; /** The file descriptor object for this socket. */ int fd; /** The local port number to which this socket is connected. */ int localport; /** The port number on the remote host to which this socket is connected. */ int port; int timeout; public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(SocketImpl) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(SocketImpl) END_LOG4CXX_CAST_MAP() SocketImpl(); ~SocketImpl(); /** @brief Accepts a connection. @param s the connection @throw SocketTimeoutException if a timeout was previously set with setSoTimeout and the timeout has been reached. @throw SocketException if an I/O error occurs when accepting the connection */ void accept(SocketImplPtr s); /** @brief Returns the number of bytes that can be read from this socket without blocking. @return the number of bytes that can be read from this socket without blocking. */ int available(); /** Binds this socket to the specified port number on the specified host. @param host the host address @param port the port number. @exception BindException if an I/O error occurs when binding this socket. */ void bind(InetAddress host, int port); /** Closes this socket. */ void close(); /** Connects this socket to the specified port number on the specified host. */ void connect(InetAddress address, int port); /** Connects this socket to the specified port on the named host. */ void connect(const String& host, int port); /** Creates either a stream or a datagram socket. */ void create(bool stream); /** Returns the value of this socket's fd field. */ inline int getFileDescriptor() const { return fd; } /** Returns the value of this socket's address field. */ inline InetAddress getInetAddress() const { return address; } /** Returns the value of this socket's localport field. */ inline int getLocalPort() const { return localport; } /** Returns the value of this socket's port field. */ inline int getPort() const { return port; } /** Sets the maximum queue length for incoming connection indications (a request to connect) to the count argument. */ void listen(int backlog); /** Returns the address and port of this socket as a String. */ String toString() const; size_t read(void * buf, size_t len) const; size_t write(const void * buf, size_t len); /** Retrive setting for SO_TIMEOUT. */ int getSoTimeout() const; /** Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. */ void setSoTimeout(int timeout); }; } // namespace helpers }; // namespace log4cxx #endif // _LOG4CXX_HELPERS_SOCKET_IMPL --- NEW FILE: dateformat.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_DATE_FORMAT_H #define _LOG4CXX_HELPERS_DATE_FORMAT_H #include <log4cxx/helpers/tchar.h> #include <log4cxx/helpers/timezone.h> namespace log4cxx { namespace helpers { /** Concrete class for formatting and parsing dates in a locale-sensitive manner. */ class LOG4CXX_EXPORT DateFormat { public: DateFormat(const String& dateFormat); DateFormat(const String& dateFormat, const TimeZonePtr& timeZone); virtual ~DateFormat () {} virtual void format(ostream& os, int64_t time) const; String format(int64_t timeMillis) const; protected: TimeZonePtr timeZone; String dateFormat; }; } // namespace helpers }; // namespace log4cxx #endif //_LOG4CXX_HELPERS_DATE_FORMAT_H --- NEW FILE: datetimedateformat.h --- /* * 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. */ #ifndef _LOG4CXX_HELPERS_DATE_TIME_DATE_FORMAT_H #define _LOG4CXX_HELPERS_DATE_TIME_DATE_FORMAT_H #include <log4cxx/helpers/dateformat.h> namespace log4cxx { namespace helpers { /** Formats a date in the format <b>\%d-\%m-\%Y \%H:\%M:\%S,\%Q</b> for example, "06 Nov 1994 15:49:37,459". */ class LOG4CXX_EXPORT DateTimeDateFormat : public DateFormat { public: DateTimeDateFormat(const TimeZonePtr& timeZone) : DateFormat(_T("%d %b %Y %H:%M:%S,%Q"), timeZone) {} }; } // namespace helpers }; // namespace log4cxx #endif // _LOG4CXX_HELPERS_DATE_TIME_DATE_FORMAT_H --- NEW FILE: threadspecificdata.h --- /* * 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 wri... [truncated message content] |
Update of /cvsroot/objecthandler/log4cxx-0.9.7/tests/witness In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25784/tests/witness Added Files: LevelMatchFilter_accept LevelMatchFilter_deny LevelRangeFilter_accept LevelRangeFilter_neutral Makefile.am NDCMatchFilter_accept NDCMatchFilter_deny customLevel.1 customLevel.2 customLevel.3 customLevel.4 customLogger.1 customLogger.2 dom.A1.1 dom.A2.1 fallback hierarchyThreshold.1 hierarchyThreshold.2 hierarchyThreshold.3 hierarchyThreshold.4 hierarchyThreshold.5 hierarchyThreshold.6 hierarchyThreshold.7 hierarchyThreshold.8 l7d.1 patternLayout.1 patternLayout.10 patternLayout.11 patternLayout.12 patternLayout.2 patternLayout.3 patternLayout.4 patternLayout.5 patternLayout.6 patternLayout.7 patternLayout.8 patternLayout.9 patternLayout.mdc.1 patternLayout.mdc.2 simple socketServer.1 socketServer.2 socketServer.3 socketServer.4 socketServer.5 socketServer.6 socketServer.7 socketServer.8 ttcc xmlLayout.1 xmlLayout.2 xmlLayout.3 xmlLayout.mdc.1 xmlLayout.mdc.2 xmlLayout.null Log Message: --- NEW FILE: xmlLayout.null --- <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="DEBUG" thread="main"> <log4j:message><![CDATA[hi]]></log4j:message> </log4j:event> <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="DEBUG" thread="main"> <log4j:message><![CDATA[]]></log4j:message> </log4j:event> --- NEW FILE: patternLayout.mdc.1 --- DEBUG - Hello World {{key1,va11}{key2,va12}} --- NEW FILE: Makefile.am --- EXTRA_DIST = * --- NEW FILE: patternLayout.mdc.2 --- starting mdc pattern test empty mdc, no key specified in pattern : {} empty mdc, key1 in pattern : empty mdc, key2 in pattern : empty mdc, key3 in pattern : empty mdc, key1, key2, and key3 in pattern : ,, filled mdc, no key specified in pattern : {{key1,value1}{key2,value2}} filled mdc, key1 in pattern : value1 filled mdc, key2 in pattern : value2 filled mdc, key3 in pattern : filled mdc, key1, key2, and key3 in pattern : value1,value2, finished mdc pattern test --- NEW FILE: simple --- FATAL - Message 0 ERROR - Message 1 FATAL - Message 2 ERROR - Message 3 WARN - Message 4 INFO - Message 5 FATAL - Message 6 ERROR - Message 7 WARN - Message 8 INFO - Message 9 FATAL - Message 10 ERROR - Message 11 FATAL - Message 12 ERROR - Message 13 FATAL - Message 14 ERROR - Message 15 WARN - Message 16 INFO - Message 17 DEBUG - Message 18 FATAL - Message 19 ERROR - Message 20 WARN - Message 21 INFO - Message 22 DEBUG - Message 23 INFO - Messages should bear numbers 0 through 23. --- NEW FILE: LevelRangeFilter_neutral --- DEBUG - pass 0; no min or max set INFO - pass 0; no min or max set WARN - pass 0; no min or max set ERROR - pass 0; no min or max set FATAL - pass 0; no min or max set WARN - pass 1; min set to WARN, max not set ERROR - pass 1; min set to WARN, max not set FATAL - pass 1; min set to WARN, max not set DEBUG - pass 2; min not set, max set to WARN INFO - pass 2; min not set, max set to WARN WARN - pass 2; min not set, max set to WARN DEBUG - pass 3; filter set to accept between DEBUG and FATAL msgs INFO - pass 3; filter set to accept between DEBUG and FATAL msgs WARN - pass 3; filter set to accept between DEBUG and FATAL msgs ERROR - pass 3; filter set to accept between DEBUG and FATAL msgs FATAL - pass 3; filter set to accept between DEBUG and FATAL msgs DEBUG - pass 4; filter set to accept between DEBUG and ERROR msgs INFO - pass 4; filter set to accept between DEBUG and ERROR msgs WARN - pass 4; filter set to accept between DEBUG and ERROR msgs ERROR - pass 4; filter set to accept between DEBUG and ERROR msgs DEBUG - pass 5; filter set to accept between DEBUG and WARN msgs INFO - pass 5; filter set to accept between DEBUG and WARN msgs WARN - pass 5; filter set to accept between DEBUG and WARN msgs DEBUG - pass 6; filter set to accept between DEBUG and INFO msgs INFO - pass 6; filter set to accept between DEBUG and INFO msgs DEBUG - pass 7; filter set to accept between DEBUG and DEBUG msgs INFO - pass 8; filter set to accept between INFO and FATAL msgs WARN - pass 8; filter set to accept between INFO and FATAL msgs ERROR - pass 8; filter set to accept between INFO and FATAL msgs FATAL - pass 8; filter set to accept between INFO and FATAL msgs INFO - pass 9; filter set to accept between INFO and ERROR msgs WARN - pass 9; filter set to accept between INFO and ERROR msgs ERROR - pass 9; filter set to accept between INFO and ERROR msgs INFO - pass 10; filter set to accept between INFO and WARN msgs WARN - pass 10; filter set to accept between INFO and WARN msgs INFO - pass 11; filter set to accept between INFO and INFO msgs WARN - pass 13; filter set to accept between WARN and FATAL msgs ERROR - pass 13; filter set to accept between WARN and FATAL msgs FATAL - pass 13; filter set to accept between WARN and FATAL msgs WARN - pass 14; filter set to accept between WARN and ERROR msgs ERROR - pass 14; filter set to accept between WARN and ERROR msgs WARN - pass 15; filter set to accept between WARN and WARN msgs ERROR - pass 18; filter set to accept between ERROR and FATAL msgs FATAL - pass 18; filter set to accept between ERROR and FATAL msgs ERROR - pass 19; filter set to accept between ERROR and ERROR msgs FATAL - pass 23; filter set to accept between FATAL and FATAL msgs --- NEW FILE: customLevel.4 --- DEBUG xml.CustomLevelTestCase - Message 1 INFO xml.CustomLevelTestCase - Message 2 WARN xml.CustomLevelTestCase - Message 3 ERROR xml.CustomLevelTestCase - Message 4 TRACE xml.CustomLevelTestCase - Message 5 --- NEW FILE: patternLayout.11 --- DEBUG [main] log4j.PatternLayoutTest: Message 0 DEBUG [main] root: Message 0 INFO [main] log4j.PatternLayoutTest: Message 1 INFO [main] root: Message 1 WARN [main] log4j.PatternLayoutTest: Message 2 WARN [main] root: Message 2 ERROR [main] log4j.PatternLayoutTest: Message 3 ERROR [main] root: Message 3 FATAL [main] log4j.PatternLayoutTest: Message 4 FATAL [main] root: Message 4 --- NEW FILE: patternLayout.10 --- [main] DEBUG patternlayouttest.cpp(X): Message 0 [main] DEBUG patternlayouttest.cpp(X): Message 0 [main] INFO patternlayouttest.cpp(X): Message 1 [main] INFO patternlayouttest.cpp(X): Message 1 [main] WARN patternlayouttest.cpp(X): Message 2 [main] WARN patternlayouttest.cpp(X): Message 2 [main] ERROR patternlayouttest.cpp(X): Message 3 [main] ERROR patternlayouttest.cpp(X): Message 3 [main] FATAL patternlayouttest.cpp(X): Message 4 [main] FATAL patternlayouttest.cpp(X): Message 4 --- NEW FILE: patternLayout.12 --- [main] DEBUG patternlayouttest.cpp(X): Message 0 [main] DEBUG patternlayouttest.cpp(X): Message 0 [main] INFO patternlayouttest.cpp(X): Message 1 [main] INFO patternlayouttest.cpp(X): Message 1 [main] WARN patternlayouttest.cpp(X): Message 2 [main] WARN patternlayouttest.cpp(X): Message 2 [main] ERROR patternlayouttest.cpp(X): Message 3 [main] ERROR patternlayouttest.cpp(X): Message 3 [main] FATAL patternlayouttest.cpp(X): Message 4 [main] FATAL patternlayouttest.cpp(X): Message 4 --- NEW FILE: NDCMatchFilter_deny --- pass 0: "level_1" does not exactly match "level_1 level_2 level_3" pass 0: "level_1" does not exactly match "level_1 level_2" pass 0: "level_1" does not exactly match "" pass 1: "level_1 level_2" does not exactly match "level_1 level_2 level_3" pass 1: "level_1 level_2" does not exactly match "level_1" pass 1: "level_1 level_2" does not exactly match "" pass 2: "level_1 level_2 level_3" does not exactly match "level_1 level_2" pass 2: "level_1 level_2 level_3" does not exactly match "level_1" pass 2: "level_1 level_2 level_3" does not exactly match "" pass 3: "level_1" not contained in "" pass 4: "level_1 level_2" not contained in "level_1" pass 4: "level_1 level_2" not contained in "" pass 5: "level_1 level_2 level_3" not contained in "level_1 level_2" pass 5: "level_1 level_2 level_3" not contained in "level_1" pass 5: "level_1 level_2 level_3" not contained in "" pass 6: "" does not exactly match "level_1 level_2 level_3" pass 6: "" does not exactly match "level_1 level_2" pass 6: "" does not exactly match "level_1" pass 7: "" not contained in "level_1 level_2 level_3" pass 7: "" not contained in "level_1 level_2" pass 7: "" not contained in "level_1" --- NEW FILE: customLevel.2 --- DEBUG xml.CustomLevelTestCase - Message 1 INFO xml.CustomLevelTestCase - Message 2 WARN xml.CustomLevelTestCase - Message 3 ERROR xml.CustomLevelTestCase - Message 4 TRACE xml.CustomLevelTestCase - Message 5 --- NEW FILE: LevelRangeFilter_accept --- DEBUG - pass 0; no min or max set INFO - pass 0; no min or max set WARN - pass 0; no min or max set ERROR - pass 0; no min or max set FATAL - pass 0; no min or max set WARN - pass 1; min set to WARN, max not set ERROR - pass 1; min set to WARN, max not set FATAL - pass 1; min set to WARN, max not set DEBUG - pass 2; min not set, max set to WARN INFO - pass 2; min not set, max set to WARN WARN - pass 2; min not set, max set to WARN DEBUG - pass 3; filter set to accept between DEBUG and FATAL msgs INFO - pass 3; filter set to accept between DEBUG and FATAL msgs WARN - pass 3; filter set to accept between DEBUG and FATAL msgs ERROR - pass 3; filter set to accept between DEBUG and FATAL msgs FATAL - pass 3; filter set to accept between DEBUG and FATAL msgs DEBUG - pass 4; filter set to accept between DEBUG and ERROR msgs INFO - pass 4; filter set to accept between DEBUG and ERROR msgs WARN - pass 4; filter set to accept between DEBUG and ERROR msgs ERROR - pass 4; filter set to accept between DEBUG and ERROR msgs DEBUG - pass 5; filter set to accept between DEBUG and WARN msgs INFO - pass 5; filter set to accept between DEBUG and WARN msgs WARN - pass 5; filter set to accept between DEBUG and WARN msgs DEBUG - pass 6; filter set to accept between DEBUG and INFO msgs INFO - pass 6; filter set to accept between DEBUG and INFO msgs DEBUG - pass 7; filter set to accept between DEBUG and DEBUG msgs INFO - pass 8; filter set to accept between INFO and FATAL msgs WARN - pass 8; filter set to accept between INFO and FATAL msgs ERROR - pass 8; filter set to accept between INFO and FATAL msgs FATAL - pass 8; filter set to accept between INFO and FATAL msgs INFO - pass 9; filter set to accept between INFO and ERROR msgs WARN - pass 9; filter set to accept between INFO and ERROR msgs ERROR - pass 9; filter set to accept between INFO and ERROR msgs INFO - pass 10; filter set to accept between INFO and WARN msgs WARN - pass 10; filter set to accept between INFO and WARN msgs INFO - pass 11; filter set to accept between INFO and INFO msgs WARN - pass 13; filter set to accept between WARN and FATAL msgs ERROR - pass 13; filter set to accept between WARN and FATAL msgs FATAL - pass 13; filter set to accept between WARN and FATAL msgs WARN - pass 14; filter set to accept between WARN and ERROR msgs ERROR - pass 14; filter set to accept between WARN and ERROR msgs WARN - pass 15; filter set to accept between WARN and WARN msgs ERROR - pass 18; filter set to accept between ERROR and FATAL msgs FATAL - pass 18; filter set to accept between ERROR and FATAL msgs ERROR - pass 19; filter set to accept between ERROR and ERROR msgs FATAL - pass 23; filter set to accept between FATAL and FATAL msgs --- NEW FILE: LevelMatchFilter_accept --- DEBUG - pass 0; filter set to accept only DEBUG msgs INFO - pass 1; filter set to accept only INFO msgs WARN - pass 2; filter set to accept only WARN msgs ERROR - pass 3; filter set to accept only ERROR msgs FATAL - pass 4; filter set to accept only FATAL msgs --- NEW FILE: dom.A2.1 --- [main] DEBUG org.apache.log4j.xml.DOMTestCase - Message 0 [main] DEBUG root - Message 0 [main] INFO org.apache.log4j.xml.DOMTestCase - Message 1 [main] INFO root - Message 1 [main] WARN org.apache.log4j.xml.DOMTestCase - Message 2 [main] WARN root - Message 2 [main] ERROR org.apache.log4j.xml.DOMTestCase - Message 3 [main] ERROR root - Message 3 [main] FATAL org.apache.log4j.xml.DOMTestCase - Message 4 [main] FATAL root - Message 4 --- NEW FILE: xmlLayout.1 --- <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase$X" timestamp="XXX" level="INFO" thread="main"> <log4j:message><![CDATA[in X() constructor]]></log4j:message> </log4j:event> <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="DEBUG" thread="main"> <log4j:message><![CDATA[Message 0]]></log4j:message> </log4j:event> <log4j:event logger="root" timestamp="XXX" level="DEBUG" thread="main"> <log4j:message><![CDATA[Message 0]]></log4j:message> </log4j:event> <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="INFO" thread="main"> <log4j:message><![CDATA[Message 1]]></log4j:message> </log4j:event> <log4j:event logger="root" timestamp="XXX" level="INFO" thread="main"> <log4j:message><![CDATA[Message 1]]></log4j:message> </log4j:event> <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="WARN" thread="main"> <log4j:message><![CDATA[Message 2]]></log4j:message> </log4j:event> <log4j:event logger="root" timestamp="XXX" level="WARN" thread="main"> <log4j:message><![CDATA[Message 2]]></log4j:message> </log4j:event> <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="ERROR" thread="main"> <log4j:message><![CDATA[Message 3]]></log4j:message> </log4j:event> <log4j:event logger="root" timestamp="XXX" level="ERROR" thread="main"> <log4j:message><![CDATA[Message 3]]></log4j:message> </log4j:event> <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="FATAL" thread="main"> <log4j:message><![CDATA[Message 4]]></log4j:message> </log4j:event> <log4j:event logger="root" timestamp="XXX" level="FATAL" thread="main"> <log4j:message><![CDATA[Message 4]]></log4j:message> </log4j:event> --- NEW FILE: xmlLayout.2 --- <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 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 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 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 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 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 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 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 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 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 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 file="xmllayouttestcase.cpp" line="X"/> </log4j:event> --- NEW FILE: xmlLayout.3 --- <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="DEBUG" thread="main"> <log4j:message><![CDATA[Message with embedded <![CDATA[<hello>hi</hello>]]>]]><![CDATA[.]]></log4j:message> <log4j:locationInfo file="xmllayouttestcase.cpp" line="X"/> </log4j:event> --- NEW FILE: customLogger.1 --- TRACE customLogger.XLoggerTestCase - Message 0 DEBUG customLogger.XLoggerTestCase - Message 1 WARN customLogger.XLoggerTestCase - Message 2 ERROR customLogger.XLoggerTestCase - Message 3 FATAL customLogger.XLoggerTestCase - Message 4 DEBUG customLogger.XLoggerTestCase - Message 5 --- NEW FILE: customLevel.1 --- DEBUG xml.CustomLevelTestCase - Message 1 INFO xml.CustomLevelTestCase - Message 2 WARN xml.CustomLevelTestCase - Message 3 ERROR xml.CustomLevelTestCase - Message 4 TRACE xml.CustomLevelTestCase - Message 5 --- NEW FILE: xmlLayout.mdc.1 --- <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="DEBUG" thread="main"> <log4j:message><![CDATA[Hello]]></log4j:message> <log4j:MDC> <log4j:data name="key1" value="val1"/> <log4j:data name="key2" value="val2"/> </log4j:MDC> </log4j:event> --- NEW FILE: xmlLayout.mdc.2 --- <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase" timestamp="XXX" level="DEBUG" thread="main"> <log4j:message><![CDATA[Hello]]></log4j:message> <log4j:MDC> <log4j:data name="<![CDATA[<blahKey value="blah"/>]]>" value="<![CDATA[blahValue]]>"/> <log4j:data name="<![CDATA[blahAttribute]]>" value="<![CDATA[<blah value="blah">]]>"/> </log4j:MDC> </log4j:event> --- NEW FILE: l7d.1 --- T1 INFO - This is the English, US test. T1 WARN - Hello world. T1 ERROR - No resource is associated with key "bogusMsg". T1 ERROR - bogusMsg T1 ERROR - This is test number 1 with string argument log4j. T1 ERROR - No resource is associated with key "bogus2". T1 INFO - bogus2 T1 INFO - Ceci est le test en francais pour la France. T1 WARN - Bonjour la France. T1 ERROR - No resource is associated with key "bogusMsg". T1 ERROR - bogusMsg T1 ERROR - Ceci est le test numero 2 contenant l'argument log4j. T1 ERROR - No resource is associated with key "bogus2". T1 INFO - bogus2 T1 INFO - Ceci est le test en francais pour la p'tite Suisse. T1 WARN - Bonjour la France. T1 ERROR - No resource is associated with key "bogusMsg". T1 ERROR - bogusMsg T1 ERROR - Ceci est le test numero 3 contenant l'argument log4j. T1 ERROR - No resource is associated with key "bogus2". T1 INFO - bogus2 --- NEW FILE: customLogger.2 --- TRACE customLogger.XLoggerTestCase - Message 0 --- NEW FILE: patternLayout.7 --- [main] DEBUG atternLayoutTest - Message 0 [main] DEBUG root - Message 0 [main] INFO atternLayoutTest - Message 1 [main] INFO root - Message 1 [main] WARN atternLayoutTest - Message 2 [main] WARN root - Message 2 [main] ERROR atternLayoutTest - Message 3 [main] ERROR root - Message 3 [main] FATAL atternLayoutTest - Message 4 [main] FATAL root - Message 4 --- NEW FILE: socketServer.8 --- DEBUG some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 1 DEBUG some8 T8 shortSocketServer MDC-TEST8 [main] root - Message 2 INFO some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 3 WARN some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 4 LETHAL some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 5 --- NEW FILE: socketServer.6 --- DEBUG some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 1 DEBUG some6 T6 client-test6 MDC-TEST6 [main] root - Message 2 INFO some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 3 WARN some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 4 LETHAL some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 5 --- NEW FILE: socketServer.7 --- DEBUG some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 1 DEBUG some7 T7 client-test7 MDC-TEST7 [main] root - Message 2 INFO some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 3 WARN some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 4 LETHAL some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 5 --- NEW FILE: socketServer.4 --- DEBUG some T4 MDC-TEST4 [main] SocketServerTestCase - Message 1 DEBUG some T4 MDC-TEST4 [main] root - Message 2 INFO some T4 MDC-TEST4 [main] SocketServerTestCase - Message 3 WARN some T4 MDC-TEST4 [main] SocketServerTestCase - Message 4 LETHAL some T4 MDC-TEST4 [main] SocketServerTestCase - Message 5 --- NEW FILE: socketServer.5 --- DEBUG some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 1 DEBUG some5 T5 MDC-TEST5 [main] root - Message 2 INFO some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 3 WARN some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 4 LETHAL some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 5 --- NEW FILE: socketServer.2 --- DEBUG T2 [main] socketservertestcase.cpp(X) Message 1 DEBUG T2 [main] socketservertestcase.cpp(X) Message 2 INFO T2 [main] socketservertestcase.cpp(X) Message 3 WARN T2 [main] socketservertestcase.cpp(X) Message 4 LETHAL T2 [main] socketservertestcase.cpp(X) Message 5 --- NEW FILE: socketServer.3 --- DEBUG T3 [main] socketservertestcase.cpp(X) Message 1 DEBUG T3 [main] socketservertestcase.cpp(X) Message 2 INFO T3 [main] socketservertestcase.cpp(X) Message 3 WARN T3 [main] socketservertestcase.cpp(X) Message 4 LETHAL T3 [main] socketservertestcase.cpp(X) Message 5 --- NEW FILE: socketServer.1 --- DEBUG T1 [main] org.apache.log4j.net.SocketServerTestCase Message 1 DEBUG T1 [main] root Message 2 INFO T1 [main] org.apache.log4j.net.SocketServerTestCase Message 3 WARN T1 [main] org.apache.log4j.net.SocketServerTestCase Message 4 LETHAL T1 [main] org.apache.log4j.net.SocketServerTestCase Message 5 --- NEW FILE: hierarchyThreshold.4 --- WARN HierarchyThresholdTestCase = m3 ERROR HierarchyThresholdTestCase = m4 FATAL HierarchyThresholdTestCase = m5 --- NEW FILE: hierarchyThreshold.5 --- INFO HierarchyThresholdTestCase = m2 WARN HierarchyThresholdTestCase = m3 ERROR HierarchyThresholdTestCase = m4 FATAL HierarchyThresholdTestCase = m5 --- NEW FILE: hierarchyThreshold.6 --- DEBUG HierarchyThresholdTestCase = m1 INFO HierarchyThresholdTestCase = m2 WARN HierarchyThresholdTestCase = m3 ERROR HierarchyThresholdTestCase = m4 FATAL HierarchyThresholdTestCase = m5 --- NEW FILE: hierarchyThreshold.7 --- TRACE HierarchyThresholdTestCase = m0 DEBUG HierarchyThresholdTestCase = m1 INFO HierarchyThresholdTestCase = m2 WARN HierarchyThresholdTestCase = m3 ERROR HierarchyThresholdTestCase = m4 FATAL HierarchyThresholdTestCase = m5 --- NEW FILE: hierarchyThreshold.1 --- --- NEW FILE: hierarchyThreshold.2 --- FATAL HierarchyThresholdTestCase = m5 --- NEW FILE: hierarchyThreshold.3 --- ERROR HierarchyThresholdTestCase = m4 FATAL HierarchyThresholdTestCase = m5 --- NEW FILE: hierarchyThreshold.8 --- TRACE HierarchyThresholdTestCase = m0 DEBUG HierarchyThresholdTestCase = m1 INFO HierarchyThresholdTestCase = m2 WARN HierarchyThresholdTestCase = m3 ERROR HierarchyThresholdTestCase = m4 FATAL HierarchyThresholdTestCase = m5 --- NEW FILE: LevelMatchFilter_deny --- INFO - pass 0; filter set to deny only DEBUG msgs WARN - pass 0; filter set to deny only DEBUG msgs ERROR - pass 0; filter set to deny only DEBUG msgs FATAL - pass 0; filter set to deny only DEBUG msgs DEBUG - pass 1; filter set to deny only INFO msgs WARN - pass 1; filter set to deny only INFO msgs ERROR - pass 1; filter set to deny only INFO msgs FATAL - pass 1; filter set to deny only INFO msgs DEBUG - pass 2; filter set to deny only WARN msgs INFO - pass 2; filter set to deny only WARN msgs ERROR - pass 2; filter set to deny only WARN msgs FATAL - pass 2; filter set to deny only WARN msgs DEBUG - pass 3; filter set to deny only ERROR msgs INFO - pass 3; filter set to deny only ERROR msgs WARN - pass 3; filter set to deny only ERROR msgs FATAL - pass 3; filter set to deny only ERROR msgs DEBUG - pass 4; filter set to deny only FATAL msgs INFO - pass 4; filter set to deny only FATAL msgs WARN - pass 4; filter set to deny only FATAL msgs ERROR - pass 4; filter set to deny only FATAL msgs --- NEW FILE: patternLayout.1 --- DEBUG - Message 0 DEBUG - Message 0 INFO - Message 1 INFO - Message 1 WARN - Message 2 WARN - Message 2 ERROR - Message 3 ERROR - Message 3 FATAL - Message 4 FATAL - Message 4 --- NEW FILE: customLevel.3 --- TRACE xml.CustomLevelTestCase - Message 5 --- NEW FILE: patternLayout.3 --- [main] DEBUG atternLayoutTest - Message 0 [main] DEBUG root - Message 0 [main] INFO atternLayoutTest - Message 1 [main] INFO root - Message 1 [main] WARN atternLayoutTest - Message 2 [main] WARN root - Message 2 [main] ERROR atternLayoutTest - Message 3 [main] ERROR root - Message 3 [main] FATAL atternLayoutTest - Message 4 [main] FATAL root - Message 4 --- NEW FILE: patternLayout.2 --- [main] DEBUG atternLayoutTest - Message 0 [main] DEBUG root - Message 0 [main] INFO atternLayoutTest - Message 1 [main] INFO root - Message 1 [main] WARN atternLayoutTest - Message 2 [main] WARN root - Message 2 [main] ERROR atternLayoutTest - Message 3 [main] ERROR root - Message 3 [main] FATAL atternLayoutTest - Message 4 [main] FATAL root - Message 4 --- NEW FILE: patternLayout.5 --- [main] DEBUG atternLayoutTest - Message 0 [main] DEBUG root - Message 0 [main] INFO atternLayoutTest - Message 1 [main] INFO root - Message 1 [main] WARN atternLayoutTest - Message 2 [main] WARN root - Message 2 [main] ERROR atternLayoutTest - Message 3 [main] ERROR root - Message 3 [main] FATAL atternLayoutTest - Message 4 [main] FATAL root - Message 4 --- NEW FILE: patternLayout.4 --- [main] DEBUG atternLayoutTest - Message 0 [main] DEBUG root - Message 0 [main] INFO atternLayoutTest - Message 1 [main] INFO root - Message 1 [main] WARN atternLayoutTest - Message 2 [main] WARN root - Message 2 [main] ERROR atternLayoutTest - Message 3 [main] ERROR root - Message 3 [main] FATAL atternLayoutTest - Message 4 [main] FATAL root - Message 4 --- NEW FILE: ttcc --- [main] FATAL ERR - Message 0 [main] ERROR ERR - Message 1 [main] FATAL INF - Message 2 [main] ERROR INF - Message 3 [main] WARN INF - Message 4 [main] INFO INF - Message 5 [main] FATAL INF.UNDEF - Message 6 [main] ERROR INF.UNDEF - Message 7 [main] WARN INF.UNDEF - Message 8 [main] INFO INF.UNDEF - Message 9 [main] FATAL INF.ERR - Message 10 [main] ERROR INF.ERR - Message 11 [main] FATAL INF.ERR.UNDEF - Message 12 [main] ERROR INF.ERR.UNDEF - Message 13 [main] FATAL DEB - Message 14 [main] ERROR DEB - Message 15 [main] WARN DEB - Message 16 [main] INFO DEB - Message 17 [main] DEBUG DEB - Message 18 [main] FATAL UNDEF - Message 19 [main] ERROR UNDEF - Message 20 [main] WARN UNDEF - Message 21 [main] INFO UNDEF - Message 22 [main] DEBUG UNDEF - Message 23 [main] INFO INF - Messages should bear numbers 0 through 23. --- NEW FILE: patternLayout.6 --- [main] DEBUG atternLayoutTest - Message 0 [main] DEBUG root - Message 0 [main] INFO atternLayoutTest - Message 1 [main] INFO root - Message 1 [main] WARN atternLayoutTest - Message 2 [main] WARN root - Message 2 [main] ERROR atternLayoutTest - Message 3 [main] ERROR root - Message 3 [main] FATAL atternLayoutTest - Message 4 [main] FATAL root - Message 4 --- NEW FILE: patternLayout.9 --- [main] DEBUG atternLayoutTest : Message 0 [main] DEBUG root : Message 0 [main] INFO atternLayoutTest : Message 1 [main] INFO root : Message 1 [main] WARN atternLayoutTest : Message 2 [main] WARN root : Message 2 [main] ERROR atternLayoutTest : Message 3 [main] ERROR root : Message 3 [main] FATAL atternLayoutTest : Message 4 [main] FATAL root : Message 4 --- NEW FILE: patternLayout.8 --- [main] DEBUG atternLayoutTest - Message 0 [main] DEBUG root - Message 0 [main] INFO atternLayoutTest - Message 1 [main] INFO root - Message 1 [main] WARN atternLayoutTest - Message 2 [main] WARN root - Message 2 [main] ERROR atternLayoutTest - Message 3 [main] ERROR root - Message 3 [main] FATAL atternLayoutTest - Message 4 [main] FATAL root - Message 4 --- NEW FILE: fallback --- FALLBACK - test - Message 0 FALLBACK - root - Message 0 FALLBACK - test - Message 1 FALLBACK - root - Message 1 FALLBACK - test - Message 2 FALLBACK - root - Message 2 FALLBACK - test - Message 3 FALLBACK - root - Message 3 FALLBACK - test - Message 4 FALLBACK - root - Message 4 --- NEW FILE: NDCMatchFilter_accept --- pass 0: "level_1" exactly matches "level_1" pass 1: "level_1 level_2" exactly matches "level_1 level_2" pass 2: "level_1 level_2 level_3" exactly matches "level_1 level_2 level_3" pass 3: "level_1" contained in "level_1 level_2 level_3" pass 3: "level_1" contained in "level_1 level_2" pass 3: "level_1" contained in "level_1" pass 4: "level_1 level_2" contained in "level_1 level_2 level_3" pass 4: "level_1 level_2" contained in "level_1 level_2" pass 5: "level_1 level_2 level_3" contained in "level_1 level_2 level_3" pass 6: "" exactly matches "" pass 7: "" contained in "" --- NEW FILE: dom.A1.1 --- DEBUG xml.DOMTestCase - Message 0 DEBUG xml.DOMTestCase - Message 0 DEBUG root - Message 0 INFO xml.DOMTestCase - Message 1 INFO xml.DOMTestCase - Message 1 INFO root - Message 1 WARN xml.DOMTestCase - Message 2 WARN xml.DOMTestCase - Message 2 WARN root - Message 2 ERROR xml.DOMTestCase - Message 3 ERROR xml.DOMTestCase - Message 3 ERROR root - Message 3 FATAL xml.DOMTestCase - Message 4 FATAL xml.DOMTestCase - Message 4 FATAL root - Message 4 |