|
Boost-Commit : |
From: john.groups_at_[hidden]
Date: 2008-01-14 14:22:16
Author: jtorjo
Date: 2008-01-14 14:22:15 EST (Mon, 14 Jan 2008)
New Revision: 42774
URL: http://svn.boost.org/trac/boost/changeset/42774
Log:
[logging]
v0.13.12, 14 jan 2008
- solved bug if user doesn't use formatters/destinations, but uses cached string classes
Properties modified:
sandbox/logging/lib/logging/tests/ (props changed)
Text files modified:
sandbox/logging/boost/logging/detail/raw_doc/changelog.hpp | 3 ++-
sandbox/logging/boost/logging/format/optimize.hpp | 10 ++++++++++
sandbox/logging/lib/logging/internal/vc8/loggingvc8/loggingvc8.vcproj | 9 +--------
sandbox/logging/lib/logging/internal/vc8/loggingvc8/test_now.cpp | 12 +++++++++++-
4 files changed, 24 insertions(+), 10 deletions(-)
Modified: sandbox/logging/boost/logging/detail/raw_doc/changelog.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/raw_doc/changelog.hpp (original)
+++ sandbox/logging/boost/logging/detail/raw_doc/changelog.hpp 2008-01-14 14:22:15 EST (Mon, 14 Jan 2008)
@@ -1,7 +1,8 @@
/**
@page page_changelog Changelog
-_at_section changelog_cur_ver Current Version: v0.13.11, 14 jan 2008
+@section changelog_cur_ver Current Version: v0.13.12, 14 jan 2008
+- solved bug if user doesn't use formatters/destinations, but uses cached string classes
- solved bug in rolling_file - it could not compile on gcc
- added test_rolling_file (tests rolling_file)
- solved bug - when used LOG_ in switch - thanks to Todd Neal!
Modified: sandbox/logging/boost/logging/format/optimize.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/optimize.hpp (original)
+++ sandbox/logging/boost/logging/format/optimize.hpp 2008-01-14 14:22:15 EST (Mon, 14 Jan 2008)
@@ -231,6 +231,10 @@
};
+ template<class stream, class string> inline stream& operator <<(stream & out, const cache_string_one_str<string> & val) {
+ out << val.full_string();
+ return out;
+ }
@@ -385,6 +389,12 @@
array m_cur_msg;
};
+ template<class stream, class string, class ptr_type> inline stream& operator <<(stream & out, const cache_string_several_str<string,ptr_type> & val) {
+ out << val.full_string();
+ return out;
+ }
+
+
}}}
#endif
Modified: sandbox/logging/lib/logging/internal/vc8/loggingvc8/loggingvc8.vcproj
==============================================================================
--- sandbox/logging/lib/logging/internal/vc8/loggingvc8/loggingvc8.vcproj (original)
+++ sandbox/logging/lib/logging/internal/vc8/loggingvc8/loggingvc8.vcproj 2008-01-14 14:22:15 EST (Mon, 14 Jan 2008)
@@ -212,7 +212,7 @@
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
- AdditionalLibraryDirectories="D:\boosts\boost_1_33_1\bin\boost\libs\thread\build\libboost_thread.lib\vc-8_0\debug\threading-multi;D:\boosts\boost_1_33_1\bin\boost\libs\date_time\build\libboost_date_time.lib\vc-8_0\debug\threading-multi"
+ AdditionalLibraryDirectories="D:\boosts\boost_1_33_1\bin\boost\libs\thread\build\libboost_thread.lib\vc-8_0\debug\threading-multi;D:\boosts\boost_1_33_1\bin\boost\libs\date_time\build\libboost_date_time.lib\vc-8_0\debug\threading-multi;D:\boosts\boost_1_33_1\bin\boost\libs\filesystem\build\libboost_filesystem.lib\vc-8_0\debug\threading-multi"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
@@ -328,13 +328,6 @@
<File
RelativePath=".\test_now.cpp"
>
- <FileConfiguration
- Name="Test|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
</File>
</Filter>
<Filter
Modified: sandbox/logging/lib/logging/internal/vc8/loggingvc8/test_now.cpp
==============================================================================
--- sandbox/logging/lib/logging/internal/vc8/loggingvc8/test_now.cpp (original)
+++ sandbox/logging/lib/logging/internal/vc8/loggingvc8/test_now.cpp 2008-01-14 14:22:15 EST (Mon, 14 Jan 2008)
@@ -37,6 +37,7 @@
BOOST_LOG_FORMAT_MSG( optimize::cache_string_one_str<> )
#include <boost/logging/format.hpp>
+#include <boost/logging/format/destination/rolling_file.hpp>
#include <boost/logging/writer/ts_write.hpp>
using namespace boost::logging;
@@ -57,7 +58,7 @@
BOOST_DEFINE_LOG(g_l, log_type)
void f () {
- BOOST_SCOPED_LOG_CTX(L_);// << "execution_pool::executor_defer_func(...)";
+// BOOST_SCOPED_LOG_CTX(L_);// << "execution_pool::executor_defer_func(...)";
L_ << "Executing component ";
}
@@ -71,6 +72,15 @@
g_l->writer().add_destination( destination::cout() );
g_l->writer().add_destination( destination::dbg_window() );
+
+ destination::rolling_file_settings settings;
+ settings
+ .file_count( 10 )
+ .max_size_bytes( 5242880 )
+ .flush_each_time(true);
+ destination::rolling_file loggerFile( "test.txt", settings );
+ g_l->writer().add_destination( loggerFile );
+
g_l->turn_cache_off();
// Step 8: use it...
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk