From: <log...@li...> - 2015-04-03 21:10:16
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Log4cpp Git repository.". The branch, master has been updated via 1d93139cc8d083d38d3ab832283b0a86c900a9e4 (commit) via 72385f1ef7638b0c63d1592452bba487ab76a5c1 (commit) from ff355cd72f31b9dc4f87e114e9bc2754f1e8bc8d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://sourceforge.net/p/log4cpp/codegit/ci/ commit 1d93139cc8d083d38d3ab832283b0a86c900a9e4 Author: Alexander Perepelkin <san...@us...> Date: Sat Apr 4 01:01:12 2015 +0400 DailyRollingFileAppender and tests for it: Linux, msvc2010 diff --git a/include/log4cpp/DailyRollingFileAppender.hh b/include/log4cpp/DailyRollingFileAppender.hh new file mode 100644 index 0000000..e11a4ee --- /dev/null +++ b/include/log4cpp/DailyRollingFileAppender.hh @@ -0,0 +1,45 @@ +/* + * DailyRollingFileAppender.hh + * + * See the COPYING file for the terms of usage and distribution. + */ + +#ifndef _LOG4CPP_DAILYROLLINGFILEAPPENDER_HH +#define _LOG4CPP_DAILYROLLINGFILEAPPENDER_HH + +#include <log4cpp/Portability.hh> +#include <log4cpp/FileAppender.hh> +#include <string> +#include <stdarg.h> + +namespace log4cpp { + + /** + DailyRollingFileAppender is a FileAppender that rolls over the logfile once + the next day starts. + @since 1.1.2 + **/ + class LOG4CPP_EXPORT DailyRollingFileAppender : public FileAppender { + public: + DailyRollingFileAppender(const std::string& name, + const std::string& fileName, + unsigned int maxDaysToKeep = maxDaysToKeepDefault, + bool append = true, + mode_t mode = 00644); + + virtual void setMaxDaysToKeep(unsigned int maxDaysToKeep); + virtual unsigned int getMaxDaysToKeep() const; + + virtual void rollOver(); + + static unsigned int maxDaysToKeepDefault; + protected: + virtual void _append(const LoggingEvent& event); + + unsigned int _maxDaysToKeep; + // last log's file creation time (or last modification if appender just created) + struct tm _logsTime; + }; +} + +#endif // _LOG4CPP_DAILYROLLINGFILEAPPENDER_HH diff --git a/msvc10/msvc10.sln b/msvc10/msvc10.sln index 96c14c4..d712cdf 100644 --- a/msvc10/msvc10.sln +++ b/msvc10/msvc10.sln @@ -1,89 +1,101 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "log4cpp", "log4cpp\log4cpp.vcxproj", "{8C796FDD-5BB9-41D5-8471-DDC897C8C486}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testCategory", "testCategory\testCategory.vcxproj", "{0347D7FB-ECBD-E461-D1A7-3900286ADB39}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testDLL", "testDLL\testDLL.vcxproj", "{813F4A72-111B-54B9-FF71-20FFE82BD199}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testMain", "testMain\testMain.vcxproj", "{E1D631EF-17BF-0DEF-7051-F548524209B8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testNDC", "testNDC\testNDC.vcxproj", "{1293A7EA-6CEA-99E3-B182-2C70FAF48033}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testNTEventLog", "testNTEventLog\testNTEventLog.vcxproj", "{4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testPattern", "testPattern\testPattern.vcxproj", "{8132454B-2841-D9DB-CA23-0FB4F0957032}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testPropConfig", "testPropConfig\testPropConfig.vcxproj", "{5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "log4cppLIB", "log4cppLIB\log4cppLIB.vcxproj", "{AFA856A0-2388-4673-9277-CE4061709569}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug with Boost|Win32 = Debug with Boost|Win32 - Debug|Win32 = Debug|Win32 - Release with Boost|Win32 = Release with Boost|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Debug with Boost|Win32.ActiveCfg = Debug with Boost|Win32 - {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Debug with Boost|Win32.Build.0 = Debug with Boost|Win32 - {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Debug|Win32.ActiveCfg = Debug|Win32 - {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Release with Boost|Win32.ActiveCfg = Release with Boost|Win32 - {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Release with Boost|Win32.Build.0 = Release with Boost|Win32 - {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Release|Win32.ActiveCfg = Release|Win32 - {0347D7FB-ECBD-E461-D1A7-3900286ADB39}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {0347D7FB-ECBD-E461-D1A7-3900286ADB39}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {0347D7FB-ECBD-E461-D1A7-3900286ADB39}.Debug|Win32.ActiveCfg = Debug|Win32 - {0347D7FB-ECBD-E461-D1A7-3900286ADB39}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {0347D7FB-ECBD-E461-D1A7-3900286ADB39}.Release with Boost|Win32.Build.0 = Release|Win32 - {0347D7FB-ECBD-E461-D1A7-3900286ADB39}.Release|Win32.ActiveCfg = Release|Win32 - {813F4A72-111B-54B9-FF71-20FFE82BD199}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {813F4A72-111B-54B9-FF71-20FFE82BD199}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {813F4A72-111B-54B9-FF71-20FFE82BD199}.Debug|Win32.ActiveCfg = Debug|Win32 - {813F4A72-111B-54B9-FF71-20FFE82BD199}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {813F4A72-111B-54B9-FF71-20FFE82BD199}.Release with Boost|Win32.Build.0 = Release|Win32 - {813F4A72-111B-54B9-FF71-20FFE82BD199}.Release|Win32.ActiveCfg = Release|Win32 - {E1D631EF-17BF-0DEF-7051-F548524209B8}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {E1D631EF-17BF-0DEF-7051-F548524209B8}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {E1D631EF-17BF-0DEF-7051-F548524209B8}.Debug|Win32.ActiveCfg = Debug|Win32 - {E1D631EF-17BF-0DEF-7051-F548524209B8}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {E1D631EF-17BF-0DEF-7051-F548524209B8}.Release with Boost|Win32.Build.0 = Release|Win32 - {E1D631EF-17BF-0DEF-7051-F548524209B8}.Release|Win32.ActiveCfg = Release|Win32 - {1293A7EA-6CEA-99E3-B182-2C70FAF48033}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {1293A7EA-6CEA-99E3-B182-2C70FAF48033}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {1293A7EA-6CEA-99E3-B182-2C70FAF48033}.Debug|Win32.ActiveCfg = Debug|Win32 - {1293A7EA-6CEA-99E3-B182-2C70FAF48033}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {1293A7EA-6CEA-99E3-B182-2C70FAF48033}.Release with Boost|Win32.Build.0 = Release|Win32 - {1293A7EA-6CEA-99E3-B182-2C70FAF48033}.Release|Win32.ActiveCfg = Release|Win32 - {4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}.Debug|Win32.ActiveCfg = Debug|Win32 - {4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}.Release with Boost|Win32.Build.0 = Release|Win32 - {4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}.Release|Win32.ActiveCfg = Release|Win32 - {8132454B-2841-D9DB-CA23-0FB4F0957032}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {8132454B-2841-D9DB-CA23-0FB4F0957032}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {8132454B-2841-D9DB-CA23-0FB4F0957032}.Debug|Win32.ActiveCfg = Debug|Win32 - {8132454B-2841-D9DB-CA23-0FB4F0957032}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {8132454B-2841-D9DB-CA23-0FB4F0957032}.Release with Boost|Win32.Build.0 = Release|Win32 - {8132454B-2841-D9DB-CA23-0FB4F0957032}.Release|Win32.ActiveCfg = Release|Win32 - {5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}.Release with Boost|Win32.Build.0 = Release|Win32 - {5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}.Release|Win32.ActiveCfg = Release|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Debug with Boost|Win32.ActiveCfg = Debug with Boost|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Debug with Boost|Win32.Build.0 = Debug with Boost|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Debug|Win32.ActiveCfg = Debug|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Debug|Win32.Build.0 = Debug|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Release with Boost|Win32.ActiveCfg = Release with Boost|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Release with Boost|Win32.Build.0 = Release with Boost|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Release|Win32.ActiveCfg = Release|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "log4cpp", "log4cpp\log4cpp.vcxproj", "{8C796FDD-5BB9-41D5-8471-DDC897C8C486}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testCategory", "testCategory\testCategory.vcxproj", "{10F2E851-7448-9243-D562-F8D9B73CBBA3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testRollingFileAppender", "testRollingFileAppender\testRollingFileAppender.vcxproj", "{3B59E1C4-5E21-7EDC-65A4-EF00F14A06F9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testDailyRollingFileAppender", "testDailyRollingFileAppender\testDailyRollingFileAppender.vcxproj", "{EE21BD7B-DE51-0E46-F2BE-0ADAD400CF39}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testDLL", "testDLL\testDLL.vcxproj", "{161D6B87-4EB8-FE88-3D3F-C633B53EC37C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testMain", "testMain\testMain.vcxproj", "{26BD5108-03AB-CC39-F67B-556F4B308578}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testNDC", "testNDC\testNDC.vcxproj", "{272F1ED6-5AA2-39ED-6B34-018AECD033CB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testNTEventLog", "testNTEventLog\testNTEventLog.vcxproj", "{4397E5A9-9A3C-B0B5-71AB-B12944F70578}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testPattern", "testPattern\testPattern.vcxproj", "{0382AEE1-DF52-72B6-8F1B-845048C09CEB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testPropConfig", "testPropConfig\testPropConfig.vcxproj", "{CBD1803A-2183-3733-E316-B89082C4DBF5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "log4cppLIB", "log4cppLIB\log4cppLIB.vcxproj", "{AFA856A0-2388-4673-9277-CE4061709569}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug with Boost|Win32 = Debug with Boost|Win32 + Debug|Win32 = Debug|Win32 + Release with Boost|Win32 = Release with Boost|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Debug with Boost|Win32.ActiveCfg = Debug with Boost|Win32 + {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Debug with Boost|Win32.Build.0 = Debug with Boost|Win32 + {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Debug|Win32.ActiveCfg = Debug|Win32 + {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Release with Boost|Win32.ActiveCfg = Release with Boost|Win32 + {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Release with Boost|Win32.Build.0 = Release with Boost|Win32 + {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Release|Win32.ActiveCfg = Release|Win32 + {10F2E851-7448-9243-D562-F8D9B73CBBA3}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 + {10F2E851-7448-9243-D562-F8D9B73CBBA3}.Debug with Boost|Win32.Build.0 = Debug|Win32 + {10F2E851-7448-9243-D562-F8D9B73CBBA3}.Debug|Win32.ActiveCfg = Debug|Win32 + {10F2E851-7448-9243-D562-F8D9B73CBBA3}.Release with Boost|Win32.ActiveCfg = Release|Win32 + {10F2E851-7448-9243-D562-F8D9B73CBBA3}.Release with Boost|Win32.Build.0 = Release|Win32 + {10F2E851-7448-9243-D562-F8D9B73CBBA3}.Release|Win32.ActiveCfg = Release|Win32 + {3B59E1C4-5E21-7EDC-65A4-EF00F14A06F9}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 + {3B59E1C4-5E21-7EDC-65A4-EF00F14A06F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {3B59E1C4-5E21-7EDC-65A4-EF00F14A06F9}.Release with Boost|Win32.ActiveCfg = Release|Win32 + {3B59E1C4-5E21-7EDC-65A4-EF00F14A06F9}.Release|Win32.ActiveCfg = Release|Win32 + {EE21BD7B-DE51-0E46-F2BE-0ADAD400CF39}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 + {EE21BD7B-DE51-0E46-F2BE-0ADAD400CF39}.Debug|Win32.ActiveCfg = Debug|Win32 + {EE21BD7B-DE51-0E46-F2BE-0ADAD400CF39}.Release with Boost|Win32.ActiveCfg = Release|Win32 + {EE21BD7B-DE51-0E46-F2BE-0ADAD400CF39}.Release|Win32.ActiveCfg = Release|Win32 + {161D6B87-4EB8-FE88-3D3F-C633B53EC37C}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 + {161D6B87-4EB8-FE88-3D3F-C633B53EC37C}.Debug with Boost|Win32.Build.0 = Debug|Win32 + {161D6B87-4EB8-FE88-3D3F-C633B53EC37C}.Debug|Win32.ActiveCfg = Debug|Win32 + {161D6B87-4EB8-FE88-3D3F-C633B53EC37C}.Release with Boost|Win32.ActiveCfg = Release|Win32 + {161D6B87-4EB8-FE88-3D3F-C633B53EC37C}.Release with Boost|Win32.Build.0 = Release|Win32 + {161D6B87-4EB8-FE88-3D3F-C633B53EC37C}.Release|Win32.ActiveCfg = Release|Win32 + {26BD5108-03AB-CC39-F67B-556F4B308578}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 + {26BD5108-03AB-CC39-F67B-556F4B308578}.Debug with Boost|Win32.Build.0 = Debug|Win32 + {26BD5108-03AB-CC39-F67B-556F4B308578}.Debug|Win32.ActiveCfg = Debug|Win32 + {26BD5108-03AB-CC39-F67B-556F4B308578}.Release with Boost|Win32.ActiveCfg = Release|Win32 + {26BD5108-03AB-CC39-F67B-556F4B308578}.Release with Boost|Win32.Build.0 = Release|Win32 + {26BD5108-03AB-CC39-F67B-556F4B308578}.Release|Win32.ActiveCfg = Release|Win32 + {272F1ED6-5AA2-39ED-6B34-018AECD033CB}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 + {272F1ED6-5AA2-39ED-6B34-018AECD033CB}.Debug with Boost|Win32.Build.0 = Debug|Win32 + {272F1ED6-5AA2-39ED-6B34-018AECD033CB}.Debug|Win32.ActiveCfg = Debug|Win32 + {272F1ED6-5AA2-39ED-6B34-018AECD033CB}.Release with Boost|Win32.ActiveCfg = Release|Win32 + {272F1ED6-5AA2-39ED-6B34-018AECD033CB}.Release with Boost|Win32.Build.0 = Release|Win32 + {272F1ED6-5AA2-39ED-6B34-018AECD033CB}.Release|Win32.ActiveCfg = Release|Win32 + {4397E5A9-9A3C-B0B5-71AB-B12944F70578}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 + {4397E5A9-9A3C-B0B5-71AB-B12944F70578}.Debug with Boost|Win32.Build.0 = Debug|Win32 + {4397E5A9-9A3C-B0B5-71AB-B12944F70578}.Debug|Win32.ActiveCfg = Debug|Win32 + {4397E5A9-9A3C-B0B5-71AB-B12944F70578}.Release with Boost|Win32.ActiveCfg = Release|Win32 + {4397E5A9-9A3C-B0B5-71AB-B12944F70578}.Release with Boost|Win32.Build.0 = Release|Win32 + {4397E5A9-9A3C-B0B5-71AB-B12944F70578}.Release|Win32.ActiveCfg = Release|Win32 + {0382AEE1-DF52-72B6-8F1B-845048C09CEB}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 + {0382AEE1-DF52-72B6-8F1B-845048C09CEB}.Debug with Boost|Win32.Build.0 = Debug|Win32 + {0382AEE1-DF52-72B6-8F1B-845048C09CEB}.Debug|Win32.ActiveCfg = Debug|Win32 + {0382AEE1-DF52-72B6-8F1B-845048C09CEB}.Release with Boost|Win32.ActiveCfg = Release|Win32 + {0382AEE1-DF52-72B6-8F1B-845048C09CEB}.Release with Boost|Win32.Build.0 = Release|Win32 + {0382AEE1-DF52-72B6-8F1B-845048C09CEB}.Release|Win32.ActiveCfg = Release|Win32 + {CBD1803A-2183-3733-E316-B89082C4DBF5}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 + {CBD1803A-2183-3733-E316-B89082C4DBF5}.Debug with Boost|Win32.Build.0 = Debug|Win32 + {CBD1803A-2183-3733-E316-B89082C4DBF5}.Debug|Win32.ActiveCfg = Debug|Win32 + {CBD1803A-2183-3733-E316-B89082C4DBF5}.Release with Boost|Win32.ActiveCfg = Release|Win32 + {CBD1803A-2183-3733-E316-B89082C4DBF5}.Release with Boost|Win32.Build.0 = Release|Win32 + {CBD1803A-2183-3733-E316-B89082C4DBF5}.Release|Win32.ActiveCfg = Release|Win32 + {AFA856A0-2388-4673-9277-CE4061709569}.Debug with Boost|Win32.ActiveCfg = Debug with Boost|Win32 + {AFA856A0-2388-4673-9277-CE4061709569}.Debug with Boost|Win32.Build.0 = Debug with Boost|Win32 + {AFA856A0-2388-4673-9277-CE4061709569}.Debug|Win32.ActiveCfg = Debug|Win32 + {AFA856A0-2388-4673-9277-CE4061709569}.Debug|Win32.Build.0 = Debug|Win32 + {AFA856A0-2388-4673-9277-CE4061709569}.Release with Boost|Win32.ActiveCfg = Release with Boost|Win32 + {AFA856A0-2388-4673-9277-CE4061709569}.Release with Boost|Win32.Build.0 = Release with Boost|Win32 + {AFA856A0-2388-4673-9277-CE4061709569}.Release|Win32.ActiveCfg = Release|Win32 + {AFA856A0-2388-4673-9277-CE4061709569}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/msvc10/testDailyRollingFileAppender/testConfig.log4cpp.dailyroll.nt.properties b/msvc10/testDailyRollingFileAppender/testConfig.log4cpp.dailyroll.nt.properties new file mode 100644 index 0000000..dce97d6 --- /dev/null +++ b/msvc10/testDailyRollingFileAppender/testConfig.log4cpp.dailyroll.nt.properties @@ -0,0 +1,19 @@ +# a DailyRollingFileAppender test config + +log4j.rootCategory=DEBUG, rootAppender +log4j.category.sub1=,DAILY, NCDAILY + +log4j.appender.rootAppender=org.apache.log4j.ConsoleAppender +log4j.appender.rootAppender.layout=org.apache.log4j.BasicLayout + +log4cpp.appender.DAILY=DailyRollingFileAppender +log4cpp.appender.DAILY.fileName=dailyrolling.log +log4cpp.appender.DAILY.maxDaysKeep=1 +log4cpp.appender.DAILY.layout=PatternLayout +log4cpp.appender.DAILY.layout.ConversionPattern=%d [%p] The message %m at time %d{%H:%M}%n + +log4cpp.appender.NCDAILY=DailyRollingFileAppender +log4cpp.appender.NCDAILY.fileName=nesteddir\dailyrolling.log +log4cpp.appender.NCDAILY.maxDaysKeep=1 +log4cpp.appender.NCDAILY.layout=PatternLayout +log4cpp.appender.NCDAILY.layout.ConversionPattern=%d [%p] The message %m at time %d{%H:%M}%n diff --git a/msvc10/testDailyRollingFileAppender/testDailyRollingFileAppender.vcxproj b/msvc10/testDailyRollingFileAppender/testDailyRollingFileAppender.vcxproj new file mode 100644 index 0000000..b22e30f --- /dev/null +++ b/msvc10/testDailyRollingFileAppender/testDailyRollingFileAppender.vcxproj @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <SccProjectName /> + <SccLocalPath /> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderOutputFile>.\Debug/testDailyRollingFileAppender.pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>.\Debug/</AssemblerListingLocation> + <ObjectFileName>.\Debug/</ObjectFileName> + <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <Link> + <OutputFile>.\Debug/testDailyRollingFileAppender.exe</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>.\Debug/testDailyRollingFileAppender.pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <Midl> + <TypeLibraryName>.\Debug/testDailyRollingFileAppender.tlb</TypeLibraryName> + <HeaderFileName> + </HeaderFileName> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderOutputFile>.\Release/testDailyRollingFileAppender.pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>.\Release/</AssemblerListingLocation> + <ObjectFileName>.\Release/</ObjectFileName> + <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <CompileAs>Default</CompileAs> + </ClCompile> + <Link> + <OutputFile>.\Release/testDailyRollingFileAppender.exe</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + <ProgramDatabaseFile>.\Release/testDailyRollingFileAppender.pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <Midl> + <TypeLibraryName>.\Release/testDailyRollingFileAppender.tlb</TypeLibraryName> + <HeaderFileName> + </HeaderFileName> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\..\tests\testDailyRollingFileAppender.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\log4cppLIB\log4cppLIB.vcxproj"> + <Project>{afa856a0-2388-4673-9277-ce4061709569}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/msvc10/testDailyRollingFileAppender/testDailyRollingFileAppender.vcxproj.user b/msvc10/testDailyRollingFileAppender/testDailyRollingFileAppender.vcxproj.user new file mode 100644 index 0000000..f5e1823 --- /dev/null +++ b/msvc10/testDailyRollingFileAppender/testDailyRollingFileAppender.vcxproj.user @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ShowAllFiles>false</ShowAllFiles> + </PropertyGroup> +</Project> \ No newline at end of file diff --git a/msvc10/testRollingFileAppender/testRollingFileAppender.vcxproj b/msvc10/testRollingFileAppender/testRollingFileAppender.vcxproj new file mode 100644 index 0000000..5d5eb73 --- /dev/null +++ b/msvc10/testRollingFileAppender/testRollingFileAppender.vcxproj @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <SccProjectName /> + <SccLocalPath /> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderOutputFile>.\Debug/testRollingFileAppender.pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>.\Debug/</AssemblerListingLocation> + <ObjectFileName>.\Debug/</ObjectFileName> + <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <Link> + <OutputFile>.\Debug/testRollingFileAppender.exe</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>.\Debug/testRollingFileAppender.pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <Midl> + <TypeLibraryName>.\Debug/testRollingFileAppender.tlb</TypeLibraryName> + <HeaderFileName> + </HeaderFileName> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderOutputFile>.\Release/testRollingFileAppender.pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>.\Release/</AssemblerListingLocation> + <ObjectFileName>.\Release/</ObjectFileName> + <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <CompileAs>Default</CompileAs> + </ClCompile> + <Link> + <OutputFile>.\Release/testRollingFileAppender.exe</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + <ProgramDatabaseFile>.\Release/testRollingFileAppender.pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <Midl> + <TypeLibraryName>.\Release/testRollingFileAppender.tlb</TypeLibraryName> + <HeaderFileName> + </HeaderFileName> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\..\tests\testRollingFileAppender.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\log4cppLIB\log4cppLIB.vcxproj"> + <Project>{afa856a0-2388-4673-9277-ce4061709569}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/msvc10/testRollingFileAppender/testRollingFileAppender.vcxproj.user b/msvc10/testRollingFileAppender/testRollingFileAppender.vcxproj.user new file mode 100644 index 0000000..f5e1823 --- /dev/null +++ b/msvc10/testRollingFileAppender/testRollingFileAppender.vcxproj.user @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ShowAllFiles>false</ShowAllFiles> + </PropertyGroup> +</Project> \ No newline at end of file diff --git a/src/DailyRollingFileAppender.cpp b/src/DailyRollingFileAppender.cpp new file mode 100644 index 0000000..a20913f --- /dev/null +++ b/src/DailyRollingFileAppender.cpp @@ -0,0 +1,174 @@ +/* + * DailyRollingFileAppender.cpp + * + * See the COPYING file for the terms of usage and distribution. + */ + +#include "PortabilityImpl.hh" +#ifdef LOG4CPP_HAVE_IO_H +# include <io.h> +#endif +#ifdef LOG4CPP_HAVE_UNISTD_H +# include <unistd.h> +#endif + +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <log4cpp/DailyRollingFileAppender.hh> +#include <log4cpp/Category.hh> +#include <log4cpp/FactoryParams.hh> +#include <memory> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <iostream> + +#ifdef LOG4CPP_HAVE_SSTREAM +#include <sstream> +#include <iomanip> +#endif + +#ifndef WIN32 // only available on Win32 +#include <dirent.h> +#endif + +namespace log4cpp { + + unsigned int DailyRollingFileAppender::maxDaysToKeepDefault = 30; + + DailyRollingFileAppender::DailyRollingFileAppender(const std::string& name, + const std::string& fileName, + unsigned int maxDaysToKeep, + bool append, + mode_t mode) : + FileAppender(name, fileName, append, mode), + _maxDaysToKeep(maxDaysToKeep != 0 ? maxDaysToKeep : maxDaysToKeepDefault) { + struct stat statBuf; + int res; + time_t t; + + // obtain last modification time + res = ::stat(fileName.c_str(), &statBuf); + if (res < 0) { + t = time(NULL); + } else { + t = statBuf.st_mtime; + } +#ifndef WIN32 // only available on Win32 + localtime_r(&t, &_logsTime); +#else + localtime_s(&_logsTime, &t); +#endif + } + + void DailyRollingFileAppender::setMaxDaysToKeep(unsigned int maxDaysToKeep) { + _maxDaysToKeep = maxDaysToKeep; + } + + unsigned int DailyRollingFileAppender::getMaxDaysToKeep() const { + return _maxDaysToKeep; + } + + void DailyRollingFileAppender::rollOver() + { + std::ostringstream filename_s; + ::close(_fd); + filename_s << _fileName << "." << _logsTime.tm_year + 1900 << "-" + << std::setfill('0') << std::setw(2) << _logsTime.tm_mon + 1 << "-" + << std::setw(2) << _logsTime.tm_mday << std::ends; + const std::string lastFn = filename_s.str(); + ::rename(_fileName.c_str(), lastFn.c_str()); + + _fd = ::open(_fileName.c_str(), _flags, _mode); + + const time_t oldest = time(NULL) - _maxDaysToKeep * 60 * 60 * 24; + +#ifndef WIN32 +#define PATHDELIMITER "/" +#else +#define PATHDELIMITER "\\" +#endif + // iterate over files around log file and delete older with same prefix + const std::string::size_type last_delimiter = _fileName.rfind(PATHDELIMITER); + const std::string dirname((last_delimiter == std::string::npos)? "." : _fileName.substr(0, last_delimiter)); + const std::string filname((last_delimiter == std::string::npos)? _fileName : _fileName.substr(last_delimiter+1, _fileName.size()-last_delimiter-1)); +#ifndef WIN32 // only available on Win32 + struct dirent **entries; + int nentries = scandir(dirname.c_str(), &entries, 0, alphasort); + if (nentries < 0) + return; + for (int i = 0; i < nentries; i++) { + struct stat statBuf; + int res = ::stat(entries[i]->d_name, &statBuf); + if ((res == -1) || (!S_ISREG(statBuf.st_mode))) { + free(entries[i]); + continue; + } + if (statBuf.st_mtime < oldest && strstr(entries[i]->d_name, filname.c_str())) { + const std::string fullfilename = dirname + PATHDELIMITER + entries[i]->d_name; + ::unlink(fullfilename.c_str()); + std::cout << " Deleting " << fullfilename.c_str() << std::endl; + } + free(entries[i]); + } + free(entries); +#else + HANDLE hFind = INVALID_HANDLE_VALUE; + WIN32_FIND_DATA ffd; + const std::string pattern = _fileName + "*"; + + hFind = FindFirstFile(pattern.c_str(), &ffd); + if (hFind != INVALID_HANDLE_VALUE) { + do { + struct stat statBuf; + const std::string fullfilename = dirname + PATHDELIMITER + ffd.cFileName; + int res = ::stat(fullfilename.c_str(), &statBuf); + if (res != -1 && statBuf.st_mtime < oldest && !(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { + std::cout << "Deleting " << fullfilename << "\n"; + ::unlink(fullfilename.c_str()); + } + } while (FindNextFile(hFind, &ffd) != 0); + + if (GetLastError() != ERROR_NO_MORE_FILES) { + // [XXX] some kind of error happened + } + FindClose(hFind); + hFind = INVALID_HANDLE_VALUE; + } +#endif + } + + void DailyRollingFileAppender::_append(const log4cpp::LoggingEvent &event) + { + struct tm now; + time_t t = time(NULL); + +#ifndef WIN32 // only available on Win32 + bool timeok = localtime_r(&t, &now) != NULL; +#else + bool timeok = localtime_s(&now, &t) == 0; +#endif + if (timeok) { + if ((now.tm_mday != _logsTime.tm_mday) || + (now.tm_mon != _logsTime.tm_mon) || + (now.tm_year != _logsTime.tm_year)) { + rollOver(); + _logsTime = now; + } + } + log4cpp::FileAppender::_append(event); + } + + std::auto_ptr<Appender> create_daily_roll_file_appender(const FactoryParams& params) + { + std::string name, filename; + bool append = true; + mode_t mode = 664; + unsigned int max_days_keep = 0; + params.get_for("daily roll file appender").required("name", name)("filename", filename)("max_days_keep", max_days_keep) + .optional("append", append)("mode", mode); + + return std::auto_ptr<Appender>(new DailyRollingFileAppender(name, filename, max_days_keep, append, mode)); + } +} diff --git a/tests/Makefile.am b/tests/Makefile.am index d91e087..ed6101d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ TESTS = testCategory testFixedContextCategory testNDC testPattern \ testErrorCollision testPriority testFilter testProperties \ - testConfig testPropertyConfig + testConfig testPropertyConfig testRollingFileAppender testDailyRollingFileAppender check_PROGRAMS = $(TESTS) check_DATA = log4cpp.init log4cpp.properties testProperties.properties \ @@ -50,5 +50,11 @@ testbench_LDADD = $(top_builddir)/src/liblog4cpp.la testErrorCollision_SOURCES = testErrorCollision.cpp testErrorCollision_LDADD = $(top_builddir)/src/liblog4cpp.la +testRollingFileAppender_SOURCES = testRollingFileAppender.cpp +testRollingFileAppender_LDADD = $(top_builddir)/src/liblog4cpp.la + +testDailyRollingFileAppender_SOURCES = testDailyRollingFileAppender.cpp +testDailyRollingFileAppender_LDADD = $(top_builddir)/src/liblog4cpp.la + distclean-local: $(RM) -f *.log diff --git a/tests/jamfile b/tests/jamfile index 15973bb..fbaf7b9 100644 --- a/tests/jamfile +++ b/tests/jamfile @@ -18,4 +18,5 @@ test-suite log4cpp : [ run testPropConfig.cpp ] [ run test_convenience.cpp ] [ run testRollingFileAppender.cpp ] + [ run testDailyRollingFileAppender.cpp ] ; diff --git a/tests/testConfig.log4cpp.dailyroll.properties b/tests/testConfig.log4cpp.dailyroll.properties new file mode 100644 index 0000000..0c8d266 --- /dev/null +++ b/tests/testConfig.log4cpp.dailyroll.properties @@ -0,0 +1,19 @@ +# a DailyRollingFileAppender test config + +log4j.rootCategory=DEBUG, rootAppender +log4j.category.sub1=,DAILY, NCDAILY + +log4j.appender.rootAppender=org.apache.log4j.ConsoleAppender +log4j.appender.rootAppender.layout=org.apache.log4j.BasicLayout + +log4cpp.appender.DAILY=DailyRollingFileAppender +log4cpp.appender.DAILY.fileName=dailyrolling.log +log4cpp.appender.DAILY.maxDaysKeep=1 +log4cpp.appender.DAILY.layout=PatternLayout +log4cpp.appender.DAILY.layout.ConversionPattern=%d [%p] The message %m at time %d{%H:%M}%n + +log4cpp.appender.NCDAILY=DailyRollingFileAppender +log4cpp.appender.NCDAILY.fileName=nesteddir/dailyrolling.log +log4cpp.appender.NCDAILY.maxDaysKeep=1 +log4cpp.appender.NCDAILY.layout=PatternLayout +log4cpp.appender.NCDAILY.layout.ConversionPattern=%d [%p] The message %m at time %d{%H:%M}%n diff --git a/tests/testDailyRollingFileAppender.cpp b/tests/testDailyRollingFileAppender.cpp new file mode 100644 index 0000000..c8b5a85 --- /dev/null +++ b/tests/testDailyRollingFileAppender.cpp @@ -0,0 +1,158 @@ +#include <log4cpp/Category.hh> +#include <log4cpp/PropertyConfigurator.hh> +#include <log4cpp/DailyRollingFileAppender.hh> +#include <stdio.h> +#include <stdlib.h> +#include <errno.h> +#include <iostream> + +#ifdef WIN32 +#pragma comment(lib, "Ws2_32.lib") +#endif + +using namespace log4cpp; +using namespace std; +static const char* const test_message = "message"; +static const char* const daily_file_prefix = "dailyrolling_file.log"; +static const char* const nestedDir = "nesteddir"; +#ifndef WIN32 +#define PATHDELIMITER "/" +#else +#define PATHDELIMITER "\\" +#endif +const char* const nesteddirname = "nesteddir"PATHDELIMITER; + + +class DailyRollingTest { + DailyRollingFileAppender* dailyApp, *nestedDirDailyApp; +public: + bool remove_impl(const char* filename) + { + int res = remove(filename); + + if (res != 0 && errno != ENOENT) + cout << "Can't remove file '" << filename << "'.\n"; + + return res == 0 || (res != 0 && errno == ENOENT); + } + + bool remove_files() + { +// if (!remove_impl(daily_file_prefix)) +// return false; + + return true; + } + + bool setup() + { + if (!remove_files()) + return false; + + Category& root = Category::getRoot(); + dailyApp = new DailyRollingFileAppender("daily-rolling-appender", daily_file_prefix, 1); + nestedDirDailyApp = new DailyRollingFileAppender("nesteddir-daily-rolling-appender", std::string(nesteddirname).append(daily_file_prefix), 1); + root.addAppender(dailyApp); + root.addAppender(nestedDirDailyApp); + root.setPriority(Priority::DEBUG); + + return true; + } + + void make_log_files() + { + Category::getRoot().debugStream() << test_message << 1; + Category::getRoot().debugStream() << test_message << 2; + Category::getRoot().debugStream() << test_message << 3; + Category::getRoot().debugStream() << "The message before rolling over attempt"; + dailyApp->rollOver(); + nestedDirDailyApp->rollOver(); + Category::getRoot().debugStream() << "The message after rolling over attempt"; + Category::getRoot().debugStream() << test_message << 4; + Category::getRoot().debugStream() << test_message << 5; + } + + bool exists(const char* filename) + { + FILE* f = fopen(filename, "r"); + if (f == NULL) + { + cout << "File '" << filename << "' doesn't exists.\n"; + return false; + } + + fclose(f); + + return true; + } + + bool check_log_files() + { + bool result = exists(daily_file_prefix); + + Category::shutdown(); + return result && remove_files(); + } +}; + +int testOnlyDailyRollingFileAppender() { + DailyRollingTest dailyTest; + if (!dailyTest.setup()) + { + cout << "Setup has failed. Check for permissions on files " << daily_file_prefix << "*'.\n"; + return -1; + } + + dailyTest.make_log_files(); + + if (dailyTest.check_log_files()) + return 0; + else + return -1; +} + +int testConfigDailyRollingFileAppender() +{ + /* looking for the init file in $srcdir is a requirement of + automake's distcheck target. + */ + const char* srcdir = getenv("srcdir"); + std::string initFileName; + try { +#if defined(WIN32) + initFileName = "./testConfig.log4cpp.dailyroll.nt.properties"; +#else + initFileName = "./testConfig.log4cpp.dailyroll.properties"; +#endif + if (srcdir != NULL) { + initFileName = std::string(srcdir) + PATHDELIMITER + initFileName; + } + + log4cpp::PropertyConfigurator::configure(initFileName); + } catch(log4cpp::ConfigureFailure& f) { + std::cout << "Configure Problem " << f.what() << "($srcdir=" << ((srcdir != NULL)?srcdir:"NULL") << ")" << std::endl; + return -1; + } + + log4cpp::Category& root = log4cpp::Category::getRoot(); + + log4cpp::Category& sub1 = + log4cpp::Category::getInstance(std::string("sub1")); + + root.error("root error"); + root.warn("root warn"); + sub1.error("sub1 error"); + sub1.warn("sub1 warn"); + + log4cpp::Category::shutdown(); + return 0; +} + +int main() +{ + int res = testOnlyDailyRollingFileAppender(); + if (!res) + res = testConfigDailyRollingFileAppender(); + + return res; +} http://sourceforge.net/p/log4cpp/codegit/ci/ commit 1d93139cc8d083d38d3ab832283b0a86c900a9e4 Author: Alexander Perepelkin <san...@us...> Date: Sat Apr 4 01:01:12 2015 +0400 DailyRollingFileAppender and tests for it: Linux, msvc2010 diff --git a/include/log4cpp/DailyRollingFileAppender.hh b/include/log4cpp/DailyRollingFileAppender.hh new file mode 100644 index 0000000..e11a4ee --- /dev/null +++ b/include/log4cpp/DailyRollingFileAppender.hh @@ -0,0 +1,45 @@ +/* + * DailyRollingFileAppender.hh + * + * See the COPYING file for the terms of usage and distribution. + */ + +#ifndef _LOG4CPP_DAILYROLLINGFILEAPPENDER_HH +#define _LOG4CPP_DAILYROLLINGFILEAPPENDER_HH + +#include <log4cpp/Portability.hh> +#include <log4cpp/FileAppender.hh> +#include <string> +#include <stdarg.h> + +namespace log4cpp { + + /** + DailyRollingFileAppender is a FileAppender that rolls over the logfile once + the next day starts. + @since 1.1.2 + **/ + class LOG4CPP_EXPORT DailyRollingFileAppender : public FileAppender { + public: + DailyRollingFileAppender(const std::string& name, + const std::string& fileName, + unsigned int maxDaysToKeep = maxDaysToKeepDefault, + bool append = true, + mode_t mode = 00644); + + virtual void setMaxDaysToKeep(unsigned int maxDaysToKeep); + virtual unsigned int getMaxDaysToKeep() const; + + virtual void rollOver(); + + static unsigned int maxDaysToKeepDefault; + protected: + virtual void _append(const LoggingEvent& event); + + unsigned int _maxDaysToKeep; + // last log's file creation time (or last modification if appender just created) + struct tm _logsTime; + }; +} + +#endif // _LOG4CPP_DAILYROLLINGFILEAPPENDER_HH diff --git a/msvc10/msvc10.sln b/msvc10/msvc10.sln index 96c14c4..d712cdf 100644 --- a/msvc10/msvc10.sln +++ b/msvc10/msvc10.sln @@ -1,89 +1,101 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "log4cpp", "log4cpp\log4cpp.vcxproj", "{8C796FDD-5BB9-41D5-8471-DDC897C8C486}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testCategory", "testCategory\testCategory.vcxproj", "{0347D7FB-ECBD-E461-D1A7-3900286ADB39}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testDLL", "testDLL\testDLL.vcxproj", "{813F4A72-111B-54B9-FF71-20FFE82BD199}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testMain", "testMain\testMain.vcxproj", "{E1D631EF-17BF-0DEF-7051-F548524209B8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testNDC", "testNDC\testNDC.vcxproj", "{1293A7EA-6CEA-99E3-B182-2C70FAF48033}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testNTEventLog", "testNTEventLog\testNTEventLog.vcxproj", "{4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testPattern", "testPattern\testPattern.vcxproj", "{8132454B-2841-D9DB-CA23-0FB4F0957032}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testPropConfig", "testPropConfig\testPropConfig.vcxproj", "{5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "log4cppLIB", "log4cppLIB\log4cppLIB.vcxproj", "{AFA856A0-2388-4673-9277-CE4061709569}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug with Boost|Win32 = Debug with Boost|Win32 - Debug|Win32 = Debug|Win32 - Release with Boost|Win32 = Release with Boost|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Debug with Boost|Win32.ActiveCfg = Debug with Boost|Win32 - {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Debug with Boost|Win32.Build.0 = Debug with Boost|Win32 - {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Debug|Win32.ActiveCfg = Debug|Win32 - {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Release with Boost|Win32.ActiveCfg = Release with Boost|Win32 - {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Release with Boost|Win32.Build.0 = Release with Boost|Win32 - {8C796FDD-5BB9-41D5-8471-DDC897C8C486}.Release|Win32.ActiveCfg = Release|Win32 - {0347D7FB-ECBD-E461-D1A7-3900286ADB39}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {0347D7FB-ECBD-E461-D1A7-3900286ADB39}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {0347D7FB-ECBD-E461-D1A7-3900286ADB39}.Debug|Win32.ActiveCfg = Debug|Win32 - {0347D7FB-ECBD-E461-D1A7-3900286ADB39}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {0347D7FB-ECBD-E461-D1A7-3900286ADB39}.Release with Boost|Win32.Build.0 = Release|Win32 - {0347D7FB-ECBD-E461-D1A7-3900286ADB39}.Release|Win32.ActiveCfg = Release|Win32 - {813F4A72-111B-54B9-FF71-20FFE82BD199}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {813F4A72-111B-54B9-FF71-20FFE82BD199}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {813F4A72-111B-54B9-FF71-20FFE82BD199}.Debug|Win32.ActiveCfg = Debug|Win32 - {813F4A72-111B-54B9-FF71-20FFE82BD199}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {813F4A72-111B-54B9-FF71-20FFE82BD199}.Release with Boost|Win32.Build.0 = Release|Win32 - {813F4A72-111B-54B9-FF71-20FFE82BD199}.Release|Win32.ActiveCfg = Release|Win32 - {E1D631EF-17BF-0DEF-7051-F548524209B8}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {E1D631EF-17BF-0DEF-7051-F548524209B8}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {E1D631EF-17BF-0DEF-7051-F548524209B8}.Debug|Win32.ActiveCfg = Debug|Win32 - {E1D631EF-17BF-0DEF-7051-F548524209B8}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {E1D631EF-17BF-0DEF-7051-F548524209B8}.Release with Boost|Win32.Build.0 = Release|Win32 - {E1D631EF-17BF-0DEF-7051-F548524209B8}.Release|Win32.ActiveCfg = Release|Win32 - {1293A7EA-6CEA-99E3-B182-2C70FAF48033}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {1293A7EA-6CEA-99E3-B182-2C70FAF48033}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {1293A7EA-6CEA-99E3-B182-2C70FAF48033}.Debug|Win32.ActiveCfg = Debug|Win32 - {1293A7EA-6CEA-99E3-B182-2C70FAF48033}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {1293A7EA-6CEA-99E3-B182-2C70FAF48033}.Release with Boost|Win32.Build.0 = Release|Win32 - {1293A7EA-6CEA-99E3-B182-2C70FAF48033}.Release|Win32.ActiveCfg = Release|Win32 - {4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}.Debug|Win32.ActiveCfg = Debug|Win32 - {4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}.Release with Boost|Win32.Build.0 = Release|Win32 - {4DAB4E24-92CF-A476-5D7F-7272C9BCBF79}.Release|Win32.ActiveCfg = Release|Win32 - {8132454B-2841-D9DB-CA23-0FB4F0957032}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {8132454B-2841-D9DB-CA23-0FB4F0957032}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {8132454B-2841-D9DB-CA23-0FB4F0957032}.Debug|Win32.ActiveCfg = Debug|Win32 - {8132454B-2841-D9DB-CA23-0FB4F0957032}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {8132454B-2841-D9DB-CA23-0FB4F0957032}.Release with Boost|Win32.Build.0 = Release|Win32 - {8132454B-2841-D9DB-CA23-0FB4F0957032}.Release|Win32.ActiveCfg = Release|Win32 - {5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}.Debug with Boost|Win32.ActiveCfg = Debug|Win32 - {5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}.Debug with Boost|Win32.Build.0 = Debug|Win32 - {5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}.Release with Boost|Win32.ActiveCfg = Release|Win32 - {5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}.Release with Boost|Win32.Build.0 = Release|Win32 - {5040EFF2-9A4A-223A-ABB1-8022B3BF34F3}.Release|Win32.ActiveCfg = Release|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Debug with Boost|Win32.ActiveCfg = Debug with Boost|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Debug with Boost|Win32.Build.0 = Debug with Boost|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Debug|Win32.ActiveCfg = Debug|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Debug|Win32.Build.0 = Debug|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Release with Boost|Win32.ActiveCfg = Release with Boost|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Release with Boost|Win32.Build.0 = Release with Boost|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Release|Win32.ActiveCfg = Release|Win32 - {AFA856A0-2388-4673-9277-CE4061709569}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "log4cpp", "log4cpp\log4cpp.vcxproj", "{8C796FDD-5BB9-41D5-8471-DDC897C8C486}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testCategory", "testCategory\testCategory.vcxproj", "{10F2E851-7448-9243-D562-F8D9B73CBBA3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testRollingFileAppender", "testRollingFileAppender\testRollingFileAppender.vcxproj", "{3B59E1C4-5E21-7EDC-65A4-EF00F14A06F9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testDailyRollingFileAppender", "testDailyRollingFileAppender\testDailyRollingFileAppender.vcxproj", "{EE21BD7B-DE51-0E46-F2BE-0ADAD400CF39}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testDLL", "testDLL\testDLL.vcxproj", "{161D6B87-4EB8-FE88-3D3F-C633B53EC37C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testMain", "testMain\testMain.vcxproj", "{26BD5108-03AB-CC39-F67B-556F4B308578}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testNDC", "testNDC\testNDC.vcxproj", "{272F1ED6-5AA2-39ED-6B34-018AECD033CB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testNTEventLog", "testNTEventLog\testNTEventLog.vcxproj", "{4397E5A9-9A3C-B0B5-71AB-B12944F70578}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testPattern", "testPattern\testPattern.vcxproj", "{0382AEE1-DF52-72B6-8F1B-845048C09CEB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testPropConfig", "testPropConfig\testPropConfig.vcxproj", "{CBD1803A-2183-3733-E316-B89082C4DBF5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "log4cppLIB", "log4cppLIB\log4cppLIB.vcxproj", "{AFA856A0-2388-4673-9277-CE4061709569}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug with Boost|Win32 = Debug ... [truncated message content] |