|
Boost-Commit : |
From: john.groups_at_[hidden]
Date: 2008-01-20 00:50:00
Author: jtorjo
Date: 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
New Revision: 42876
URL: http://svn.boost.org/trac/boost/changeset/42876
Log:
[logging]
v0.20.10, 20 jan 2008
- added logger_to_gather, removed DEFINE_GATHER_CLASS;
- modified compile_time example, to see compile time with precompiled header
Added:
sandbox/logging/lib/logging/samples/compile_time/stdafx.cpp (contents, props changed)
sandbox/logging/lib/logging/samples/compile_time/stdafx.h (contents, props changed)
Text files modified:
sandbox/logging/boost/logging/detail/cache_before_init_macros.hpp | 2
sandbox/logging/boost/logging/detail/format_msg_type.hpp | 38 -----
sandbox/logging/boost/logging/detail/log_keeper.hpp | 17 +-
sandbox/logging/boost/logging/detail/logger.hpp | 21 +++
sandbox/logging/boost/logging/detail/macros.hpp | 6
sandbox/logging/boost/logging/detail/raw_doc/caching.hpp | 6
sandbox/logging/boost/logging/detail/raw_doc/changelog.hpp | 3
sandbox/logging/boost/logging/detail/raw_doc/todo.hpp | 6
sandbox/logging/boost/logging/detail/use_format_write.hpp | 6
sandbox/logging/boost/logging/format_fwd.hpp | 29 ++++
sandbox/logging/boost/logging/gather/ostream_like.hpp | 2
sandbox/logging/lib/logging/samples/compile_time/basic_usage.vcproj | 255 ++++++++++++++++++++++++++++++++++++++++
sandbox/logging/lib/logging/samples/compile_time/compile_time.sln | 9 +
sandbox/logging/lib/logging/samples/compile_time/copy01.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy02.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy03.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy04.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy05.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy06.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy07.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy08.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy09.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy10.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy11.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy12.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy13.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy14.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy15.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy16.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy17.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy18.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy19.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/copy20.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/log.cpp | 5
sandbox/logging/lib/logging/samples/compile_time/log.h | 20 +++
sandbox/logging/lib/logging/samples/compile_time/main.cpp | 1
sandbox/logging/lib/logging/samples/compile_time/original.cpp | 9
sandbox/logging/lib/logging/samples/scenarios/use_tss_ostringstream.cpp | 3
38 files changed, 387 insertions(+), 71 deletions(-)
Modified: sandbox/logging/boost/logging/detail/cache_before_init_macros.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/cache_before_init_macros.hpp (original)
+++ sandbox/logging/boost/logging/detail/cache_before_init_macros.hpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -37,7 +37,7 @@
#define BOOST_LOG_BEFORE_INIT_USE_IGNORE_BEFORE_INIT
#else
// use default
- #define BOOST_LOG_BEFORE_INIT_USE_CACHE_FILTER
+ #define BOOST_LOG_BEFORE_INIT_USE_LOG_ALL
#endif
Modified: sandbox/logging/boost/logging/detail/format_msg_type.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/format_msg_type.hpp (original)
+++ sandbox/logging/boost/logging/detail/format_msg_type.hpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -60,46 +60,8 @@
}
-/**
- @brief ... just in case you want to specify the ostringstream for the gather class.
-*/
-template<class ostringstream> struct use_ostringstream { };
-
-namespace detail {
- // gather - if default -> use find_gather< default, default >
- // - if use_ostringstream -> use find_gather< default, ostringstream>
- // - else -> use it
- template<class msg_type, class gather> struct find_gather_from_class {
- typedef gather type;
- };
-
- template<class msg_type> struct find_gather_from_class<msg_type, default_> {
- typedef typename find_gather< std::basic_ostringstream<char_type>, msg_type >::type type;
- };
-
- template<class msg_type, class stream> struct find_gather_from_class<msg_type, use_ostringstream<stream> > {
- typedef typename find_gather< stream, msg_type >::type type;
- };
-}
-
-/*
- for when compiling fast, and:
- - I know the gather type OR
- - use a default gather
-*/
-namespace detail {
-
- template<class T = override> struct fast_compile_with_default_gather {
- typedef typename boost::logging::formatter::msg_type<T>::type msg_type_ref;
- typedef typename boost::remove_reference<msg_type_ref>::type msg_type;
-
- typedef typename ::boost::logging::gather::find<T>::template from_msg_type<msg_type>::type gather_msg;
- //typedef typename find_gather< std::basic_ostringstream<char_type>, msg_type >::type gather_msg;
- typedef logger< gather_msg, default_ > log_type;
- };
-}
}}
Modified: sandbox/logging/boost/logging/detail/log_keeper.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/log_keeper.hpp (original)
+++ sandbox/logging/boost/logging/detail/log_keeper.hpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -28,7 +28,6 @@
namespace detail {
- template<class T> struct fast_compile_with_default_gather ;
} // namespace detail
@@ -41,8 +40,8 @@
This is a base class. Use logger_holder_by_value or logger_holder_by_ptr instead
*/
-template<class type, class gather_msg = default_, class dummy = override> struct logger_holder {
- typedef typename use_default<gather_msg, typename ::boost::logging::detail::fast_compile_with_default_gather<dummy>::gather_msg > ::type gather_type;
+template<class type> struct logger_holder {
+ typedef typename logger_to_gather<type> ::gather_type gather_type;
typedef logger<gather_type> logger_base_type;
const type* operator->() const { return m_log; }
@@ -84,8 +83,8 @@
This keeps the logger by value, so that the after_being_destroyed stuff works.
More specifically, in case the logger is used after it's been destroyed, the logger_holder instances CAN ONLY BE GLOBAL.
*/
-template<class type, class gather_msg = default_> struct logger_holder_by_value : logger_holder<type, gather_msg> {
- typedef logger_holder<type, gather_msg> base_type;
+template<class type> struct logger_holder_by_value : logger_holder<type> {
+ typedef logger_holder<type> base_type;
BOOST_LOGGING_FORWARD_CONSTRUCTOR_INIT(logger_holder_by_value, m_log_value, init)
private:
@@ -107,8 +106,8 @@
This keeps the logger by value, so that the after_being_destroyed stuff works.
More specifically, in case the logger is used after it's been destroyed, the logger_holder instances CAN ONLY BE GLOBAL.
*/
-template<class type, class gather_msg = default_> struct logger_holder_by_ptr : logger_holder<type, gather_msg> {
- typedef logger_holder<type, gather_msg> base_type;
+template<class type> struct logger_holder_by_ptr : logger_holder<type> {
+ typedef logger_holder<type> base_type;
BOOST_LOGGING_FORWARD_CONSTRUCTOR_WITH_NEW_AND_INIT(logger_holder_by_ptr, m_log_ptr, type, init)
~logger_holder_by_ptr() {
@@ -170,10 +169,10 @@
template<class logger> inline logger* get_logger_base(logger * l) { return l; }
template<class logger> inline const logger* get_logger_base(const logger * l) { return l; }
-template<class type, class gather_msg> inline typename logger_holder<type,gather_msg>::logger_base_type* get_logger_base(logger_holder<type,gather_msg> & l) {
+template<class type> inline typename logger_holder<type>::logger_base_type* get_logger_base(logger_holder<type> & l) {
return l.base();
}
-template<class type, class gather_msg> inline const typename logger_holder<type,gather_msg>::logger_base_type* get_logger_base(const logger_holder<type,gather_msg> & l) {
+template<class type> inline const typename logger_holder<type>::logger_base_type* get_logger_base(const logger_holder<type> & l) {
return l.base();
}
Modified: sandbox/logging/boost/logging/detail/logger.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/logger.hpp (original)
+++ sandbox/logging/boost/logging/detail/logger.hpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -314,6 +314,27 @@
+
+ /**
+ Given a logger class, finds its gather_msg , without needing to know the logger's definition
+ (a typedef is enough)
+ */
+ template<class> struct logger_to_gather {};
+ template<class gather_msg, class write_msg> struct logger_to_gather< logger<gather_msg,write_msg> > {
+ typedef gather_msg gather_type;
+ };
+
+
+
+
+
+
+
+
+
+
+
+
/**
@param write_msg the write message class. If a pointer, forwards to a pointer. If not a pointer, it holds it by value.
Modified: sandbox/logging/boost/logging/detail/macros.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/macros.hpp (original)
+++ sandbox/logging/boost/logging/detail/macros.hpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -654,12 +654,6 @@
}}}
-#define BOOST_LOG_GATHER_CLASS(gather_class) \
- namespace boost { namespace logging { namespace gather { \
- template<> struct find<override> { template<class msg_type> struct from_msg_type { \
- typedef typename ::boost::logging::detail::find_gather_from_class<msg_type, gather_class > ::type type; }; }; \
- }}}
-
Modified: sandbox/logging/boost/logging/detail/raw_doc/caching.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/raw_doc/caching.hpp (original)
+++ sandbox/logging/boost/logging/detail/raw_doc/caching.hpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -55,12 +55,10 @@
@section caching_BOOST_LOG_BEFORE_INIT_CACHE_FILTER Cache messages before logs are initialized/ cache their filter as well (BOOST_LOG_BEFORE_INIT_CACHE_FILTER)
-The first case is the default. It's a bit inefficient (after invoking the filter, it will always ask if cache is on or off). Also,
+It's a bit inefficient (after invoking the filter, it will always ask if cache is on or off). Also,
it increases the application's size a bit - for each log statement, I will generate a callback that I can call later to see if the filter
is still turned on or off.
-Again, this is the default - if you do want to enforce it, make sure you define the @c BOOST_LOG_BEFORE_INIT_CACHE_FILTER globally.
-
@code
...
#define L_ BOOST_LOG_USE_LOG_IF_FILTER(g_l(), g_log_filter()->is_enabled() )
@@ -74,7 +72,7 @@
@section caching_BOOST_LOG_BEFORE_INIT_LOG_ALL Cache messages before logs are initialized regardless of their filter (BOOST_LOG_BEFORE_INIT_LOG_ALL)
-In the second case, when cache is on, all messages are cached, regardless of their filter (it's like all filters are on).
+This case is the @b default. In the second case, when cache is on, all messages are cached, regardless of their filter (it's like all filters are on).
Then, when cache is turned off, all messages are logged.
If you do want to use this setting, make sure you define the @c BOOST_LOG_BEFORE_INIT_LOG_ALL globally.
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-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,7 +1,8 @@
/**
@page page_changelog Changelog
-_at_section changelog_cur_ver Current Version: v0.20.9, 19 jan 2008
+@section changelog_cur_ver Current Version: v0.20.10, 20 jan 2008
+- added logger_to_gather,
- added profiler - allow profiling the logging code
- solved bug in logger_holder_by_value - many thanks to Olaf!
- refactored logger_holder - that is, we need to return logger_holder,
Modified: sandbox/logging/boost/logging/detail/raw_doc/todo.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/raw_doc/todo.hpp (original)
+++ sandbox/logging/boost/logging/detail/raw_doc/todo.hpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -24,6 +24,8 @@
- @c normal on_dedicated_thead - remove dependency on boost::thread
+- @c high make it compile faster (most likely improve use_format_write, etc)
+
- @c normal profiler - we can care about threads as well (that is, for instance, when logging on another thread, see how much time
it takes from the threads that actually work)
@@ -35,8 +37,6 @@
I could probably do a bit more about caching as well - however, in this case, I should allow
for macros to be visible in client code (for instance, if client wants BOOST_LOG_BEFORE_INIT_USE_CACHE_FILTER)
-- @c high What should I do if someone is trying to use the log after it's been destroyed?
-
- @c high test TSS on vs2003 and gcc/pthreads \n
(note: tested on pthreads; however - about internal implementation : 2 TSS objects are leaked on pthreads, need to see why)
@@ -130,8 +130,6 @@
By looking at the namespace itself, it contains other stuff as well. See if I can use @ ingroup or something
- @c normal Explain about config files - you can use named_spacer,named.
-
-- @c normal explain about gather class - how to define (BOOST_LOG_GATHER_CLASS)
*/
}}
Modified: sandbox/logging/boost/logging/detail/use_format_write.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/use_format_write.hpp (original)
+++ sandbox/logging/boost/logging/detail/use_format_write.hpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -93,6 +93,7 @@
typedef typename use_default<destination_base_type, boost::logging::destination::base<> > ::type destination_base;
typedef typename use_default<lock_resource, ::boost::logging::types<override>::lock_resource> ::type lock_resource_type;
+ // FIXME I might be able to get this from formatter::msg_type<>::raw_type
typedef typename format_base::raw_param format_param;
typedef typename ::boost::logging::gather::find<override>::template from_msg_type<format_param>::type gather_type;
@@ -143,7 +144,7 @@
>::type
>
{
- // FIXME we don't use gather - to define the gather class you use BOOST_LOG_GATHER_CLASS
+ // FIXME we don't use gather - to see what we should do here
typedef logger<
typename use_format_write<format_base, destination_base, gather, lock_resource>::gather_type,
@@ -164,6 +165,9 @@
BOOST_LOGGING_FORWARD_CONSTRUCTOR(logger_format_write, logger_base_type)
};
+
+
+
}}
#endif
Modified: sandbox/logging/boost/logging/format_fwd.hpp
==============================================================================
--- sandbox/logging/boost/logging/format_fwd.hpp (original)
+++ sandbox/logging/boost/logging/format_fwd.hpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -117,6 +117,35 @@
};
+
+namespace detail {
+ /** this is just a simple way to always return override; however, in this case we postpone the instantiation
+ until the type parameter is known
+
+
+ For instance:
+ typedef typename formatter::msg_type<override>::raw_type msg_type;
+
+ would compute msg_type right now; however, we want the compiler to wait, until the user has actually set the msg_type,
+ for example, using the BOOST_LOG_FORMAT_MSG macro
+ */
+ template<class> struct to_override { typedef override type; };
+ template<> struct to_override<void_> { typedef void_ type; };
+}
+
+// specialize for logger_format_write
+template<class format_base, class destination_base, class thread_safety, class gather, class lock_resource>
+ struct logger_to_gather< logger_format_write<format_base, destination_base, thread_safety, gather, lock_resource> > {
+
+ typedef typename detail::to_override<format_base>::type T;
+
+ // FIXME in the future, I might provide gather as a specific class!
+ typedef typename formatter::msg_type<T>::raw_type msg_type;
+ typedef typename ::boost::logging::gather::find<T>::template from_msg_type<msg_type>::type gather_type;
+
+};
+
+
}}
Modified: sandbox/logging/boost/logging/gather/ostream_like.hpp
==============================================================================
--- sandbox/logging/boost/logging/gather/ostream_like.hpp (original)
+++ sandbox/logging/boost/logging/gather/ostream_like.hpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -161,7 +161,7 @@
See @ref boost::logging::tag namespace
*/
- template<class holder_type, class stream_type> struct return_tag_holder : out_base {
+template<class holder_type, class stream_type> struct return_tag_holder : out_base {
// what does the gather_msg class return?
// typedef holder_type& param;
typedef holder_type msg_type;
Modified: sandbox/logging/lib/logging/samples/compile_time/basic_usage.vcproj
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/basic_usage.vcproj (original)
+++ sandbox/logging/lib/logging/samples/compile_time/basic_usage.vcproj 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -321,6 +321,237 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
+ <Configuration
+ Name="DebugWithoutLog|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".,../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;COMPILE_WITHOUT_LOG"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="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"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DebugWithPrecompiled|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".,../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="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"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DbgPrecompiledNoLogK|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".,../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;BOOST_LOG_COMPILE_FAST_OFF"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="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"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
@@ -429,6 +660,30 @@
RelativePath=".\ReadMe.txt"
>
</File>
+ <File
+ RelativePath=".\stdafx.cpp"
+ >
+ <FileConfiguration
+ Name="DebugWithPrecompiled|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DbgPrecompiledNoLogK|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
</Files>
<Globals>
</Globals>
Modified: sandbox/logging/lib/logging/samples/compile_time/compile_time.sln
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/compile_time.sln (original)
+++ sandbox/logging/lib/logging/samples/compile_time/compile_time.sln 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -5,16 +5,25 @@
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DbgPrecompiledNoLogK|Win32 = DbgPrecompiledNoLogK|Win32
Debug|Win32 = Debug|Win32
DebugCompileSlow|Win32 = DebugCompileSlow|Win32
+ DebugWithoutLog|Win32 = DebugWithoutLog|Win32
+ DebugWithPrecompiled|Win32 = DebugWithPrecompiled|Win32
Release|Win32 = Release|Win32
ReleaseCompileSlow|Win32 = ReleaseCompileSlow|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {011E74A4-F775-4EE3-B195-03B308F7D2F0}.DbgPrecompiledNoLogK|Win32.ActiveCfg = DbgPrecompiledNoLogK|Win32
+ {011E74A4-F775-4EE3-B195-03B308F7D2F0}.DbgPrecompiledNoLogK|Win32.Build.0 = DbgPrecompiledNoLogK|Win32
{011E74A4-F775-4EE3-B195-03B308F7D2F0}.Debug|Win32.ActiveCfg = Debug|Win32
{011E74A4-F775-4EE3-B195-03B308F7D2F0}.Debug|Win32.Build.0 = Debug|Win32
{011E74A4-F775-4EE3-B195-03B308F7D2F0}.DebugCompileSlow|Win32.ActiveCfg = DebugCompileSlow|Win32
{011E74A4-F775-4EE3-B195-03B308F7D2F0}.DebugCompileSlow|Win32.Build.0 = DebugCompileSlow|Win32
+ {011E74A4-F775-4EE3-B195-03B308F7D2F0}.DebugWithoutLog|Win32.ActiveCfg = DebugWithoutLog|Win32
+ {011E74A4-F775-4EE3-B195-03B308F7D2F0}.DebugWithoutLog|Win32.Build.0 = DebugWithoutLog|Win32
+ {011E74A4-F775-4EE3-B195-03B308F7D2F0}.DebugWithPrecompiled|Win32.ActiveCfg = DebugWithPrecompiled|Win32
+ {011E74A4-F775-4EE3-B195-03B308F7D2F0}.DebugWithPrecompiled|Win32.Build.0 = DebugWithPrecompiled|Win32
{011E74A4-F775-4EE3-B195-03B308F7D2F0}.Release|Win32.ActiveCfg = Release|Win32
{011E74A4-F775-4EE3-B195-03B308F7D2F0}.Release|Win32.Build.0 = Release|Win32
{011E74A4-F775-4EE3-B195-03B308F7D2F0}.ReleaseCompileSlow|Win32.ActiveCfg = ReleaseCompileSlow|Win32
Modified: sandbox/logging/lib/logging/samples/compile_time/copy01.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy01.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy01.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy02.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy02.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy02.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy03.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy03.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy03.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy04.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy04.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy04.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy05.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy05.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy05.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy06.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy06.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy06.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy07.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy07.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy07.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy08.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy08.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy08.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy09.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy09.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy09.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy10.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy10.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy10.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy11.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy11.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy11.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy12.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy12.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy12.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy13.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy13.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy13.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy14.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy14.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy14.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy15.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy15.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy15.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy16.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy16.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy16.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy17.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy17.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy17.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy18.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy18.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy18.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy19.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy19.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy19.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/copy20.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/copy20.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/copy20.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,2 +1,3 @@
+#include "stdafx.h"
#include "log.h"
#include "original.cpp"
Modified: sandbox/logging/lib/logging/samples/compile_time/log.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/log.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/log.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,7 +1,10 @@
+#include "stdafx.h"
#include "log.h"
#include <boost/logging/format.hpp>
+#ifndef COMPILE_WITHOUT_LOG
+
using namespace boost::logging;
// Step 6: Define the filters and loggers you'll use
@@ -22,3 +25,5 @@
g_l()->writer().add_destination( destination::file("out.txt") );
g_l()->turn_cache_off();
}
+
+#endif
Modified: sandbox/logging/lib/logging/samples/compile_time/log.h
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/log.h (original)
+++ sandbox/logging/lib/logging/samples/compile_time/log.h 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,6 +1,8 @@
#ifndef LOG_H_header
#define LOG_H_header
+#ifndef COMPILE_WITHOUT_LOG
+
#include <boost/logging/format_fwd.hpp>
#include <boost/logging/tags.hpp>
@@ -32,4 +34,22 @@
void init_logs();
+#else
+
+#include <sstream>
+#include <iostream>
+
+namespace boost { namespace logging {} }
+
+struct temp {
+ std::ostringstream& out() { return m_out; }
+ std::ostringstream m_out;
+};
+
+#define LDBG_ temp().out()
+#define LERR_ temp().out()
+#define LAPP_ temp().out()
+
+#endif
+
#endif
Modified: sandbox/logging/lib/logging/samples/compile_time/main.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/main.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/main.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,3 +1,4 @@
+#include "stdafx.h"
// main.cpp : Where the main() action is
/**
Modified: sandbox/logging/lib/logging/samples/compile_time/original.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/compile_time/original.cpp (original)
+++ sandbox/logging/lib/logging/samples/compile_time/original.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -1,3 +1,4 @@
+#include "stdafx.h"
#include "log.h"
using namespace boost::logging;
@@ -18,11 +19,11 @@
std::string hello = "hello", world = "world";
LAPP_ << hello << ", " << world;
- g_l_filter()->set_enabled(level::error);
+// g_l_filter()->set_enabled(level::error);
LDBG_ << "this will not be written anywhere";
LAPP_ << "this won't be written anywhere either";
- g_l_filter()->set_enabled(level::info);
+// g_l_filter()->set_enabled(level::info);
LAPP_ << "good to be back ;) " << i++;
LERR_ << "second error " << i++;
@@ -38,11 +39,11 @@
LAPP_ << hello << ", " << world;
- g_l_filter()->set_enabled(level::error);
+// g_l_filter()->set_enabled(level::error);
LAPP_ << "this will not be written anywhere";
LAPP_ << "this won't be written anywhere either";
- g_l_filter()->set_enabled(level::info);
+// g_l_filter()->set_enabled(level::info);
LAPP_ << "good to be back ;) " << val();
LERR_ << "second error " << val();
Added: sandbox/logging/lib/logging/samples/compile_time/stdafx.cpp
==============================================================================
--- (empty file)
+++ sandbox/logging/lib/logging/samples/compile_time/stdafx.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -0,0 +1,2 @@
+
+#include "stdafx.h"
Added: sandbox/logging/lib/logging/samples/compile_time/stdafx.h
==============================================================================
--- (empty file)
+++ sandbox/logging/lib/logging/samples/compile_time/stdafx.h 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -0,0 +1,3 @@
+
+// want to see how much including this in a precompiled header file would do
+#include "log.h"
Modified: sandbox/logging/lib/logging/samples/scenarios/use_tss_ostringstream.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/scenarios/use_tss_ostringstream.cpp (original)
+++ sandbox/logging/lib/logging/samples/scenarios/use_tss_ostringstream.cpp 2008-01-20 00:49:57 EST (Sun, 20 Jan 2008)
@@ -38,8 +38,7 @@
// Step 1: Optimize : use a cache string, to make formatting the message faster
BOOST_LOG_FORMAT_MSG( optimize::cache_string_one_str<> )
-BOOST_LOG_GATHER_CLASS( use_ostringstream< tss_ostringstream<> > )
-
+// FIXME need to set the gather class
#include <boost/logging/format.hpp>
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