Boost logo

Boost-Commit :

From: john.groups_at_[hidden]
Date: 2007-11-10 12:41:26


Author: jtorjo
Date: 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
New Revision: 40998
URL: http://svn.boost.org/trac/boost/changeset/40998

Log:
[logging]
v0.11.6, 10 nov 2007
- added tags - and documented them
- applied patch from Jens Seidel - many thanks!
Added:
   sandbox/logging/lib/logging/samples/scenarios/using_tags.cpp (contents, props changed)
Properties modified:
   sandbox/logging/lib/logging/internal/vc8/loggingvc8/ (props changed)
Text files modified:
   sandbox/logging/boost/logging/detail/find_gather.hpp | 30 +++--
   sandbox/logging/boost/logging/detail/raw_doc/changelog.hpp | 6 +
   sandbox/logging/boost/logging/detail/raw_doc/fixme.hpp | 2
   sandbox/logging/boost/logging/detail/raw_doc/main.hpp | 8
   sandbox/logging/boost/logging/detail/raw_doc/scenarios.hpp | 21 ++-
   sandbox/logging/boost/logging/detail/raw_doc/scenarios_code.hpp | 6 +
   sandbox/logging/boost/logging/detail/raw_doc/table_of_contents.hpp | 3
   sandbox/logging/boost/logging/detail/ts/ts_resource.hpp | 4
   sandbox/logging/boost/logging/format/destination/defaults.hpp | 10 +
   sandbox/logging/boost/logging/format/destination/file.hpp | 5
   sandbox/logging/boost/logging/format/destination/rolling_file.hpp | 5
   sandbox/logging/boost/logging/format/destination/shared_memory.hpp | 5
   sandbox/logging/boost/logging/format/formatter/convert_format.hpp | 35 +++---
   sandbox/logging/boost/logging/format/formatter/defaults.hpp | 14 ++
   sandbox/logging/boost/logging/format/formatter/tags.hpp | 138 +++++++++++++++++++++++++++
   sandbox/logging/boost/logging/format/formatter/thread_id.hpp | 3
   sandbox/logging/boost/logging/format/formatter/time.hpp | 20 +++
   sandbox/logging/boost/logging/format_fwd.hpp | 25 +++++
   sandbox/logging/boost/logging/macros.hpp | 8
   sandbox/logging/boost/logging/tag/defaults.hpp | 35 +++++-
   sandbox/logging/boost/logging/tags.hpp | 197 +++++++++++++++++++++++++++++++++++++++
   sandbox/logging/boost/logging/writer/on_dedicated_thread.hpp | 44 ++++++--
   sandbox/logging/lib/logging/internal/vc8/loggingvc8/loggingvc8.vcproj | 12 ++
   sandbox/logging/lib/logging/tests/do_not_use/testfast.cpp | 8
   24 files changed, 546 insertions(+), 98 deletions(-)

Modified: sandbox/logging/boost/logging/detail/find_gather.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/find_gather.hpp (original)
+++ sandbox/logging/boost/logging/detail/find_gather.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -28,18 +28,20 @@
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // specialize logger for format_write class
     //
- template<
- class string_ ,
- class param1 ,
- class param2 ,
- class param3 ,
- class param4 ,
- class param5 ,
- class param6 ,
- class param7 ,
- class param8 ,
- class param9 ,
- class param10> struct tag_holder ;
+ namespace tag {
+ template<
+ class string_ ,
+ class param1 ,
+ class param2 ,
+ class param3 ,
+ class param4 ,
+ class param5 ,
+ class param6 ,
+ class param7 ,
+ class param8 ,
+ class param9 ,
+ class param10> struct holder ;
+ }
 
     namespace gather { namespace ostream_like {
         template<class, class> struct return_str ;
@@ -67,8 +69,8 @@
 
 
         template<class string, class p1, class p2, class p3, class p4, class p5, class p6, class p7, class p8, class p9, class p10>
- struct find_gather< tag_holder<string,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10> > {
- typedef gather::ostream_like::return_tag_holder< tag_holder<string,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10> , std::basic_ostringstream<char_type> > type;
+ struct find_gather< tag::holder<string,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10> > {
+ typedef gather::ostream_like::return_tag_holder< tag::holder<string,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10> , std::basic_ostringstream<char_type> > type;
         };
     }
 

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 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -1,7 +1,11 @@
 /**
 @page page_changelog Changelog
 
-_at_section changelog_cur_ver Current Version: v0.11.4, 10 nov 2007
+@section changelog_cur_ver Current Version: v0.11.6, 10 nov 2007
+- added tags - and documented them
+- applied patch from Jens Seidel - many thanks!
+
+v0.11.4, 10 nov 2007
 - made basic_usage compile again (some late changes made the build break)
 - removed #ifdef that would allow TSS only on Windows
 - can now see the current version from the contents

Modified: sandbox/logging/boost/logging/detail/raw_doc/fixme.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/raw_doc/fixme.hpp (original)
+++ sandbox/logging/boost/logging/detail/raw_doc/fixme.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -7,7 +7,7 @@
 no more process_msg class -> remove from docs!
 gathering the message - gather class must hold "param" type!
 gather namespace - rewrite docs
-
+update namespace_concepts - I have scenario/tags/ etc!
 tell about logger_format_write <> - in format_write<> as well
 
 

Modified: sandbox/logging/boost/logging/detail/raw_doc/main.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/raw_doc/main.hpp (original)
+++ sandbox/logging/boost/logging/detail/raw_doc/main.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -19,12 +19,12 @@
 how much bandwidth you application consumes, etc. - it's up to you how much information you log, and where.
 
 The Boost Log Library has these features:
-- A simple and clear separation of concepts
+- A simple and clear separation of @ref namespace_concepts "concepts"
     - concepts are also easily separated into namespaces
 - A very flexible interface
 - You don't pay for what you don't use.
-- Fits a lot of scenarios: from very simple (dumping all to one log)
- to very complex (multiple logs, some enabled/some not, levels, etc).
+- Fits a lot of @ref common_scenarios "scenarios": from @ref common_scenarios_6 "very simple" (dumping all to one log)
+ to @ref scenario::usage "very complex" (multiple logs, some enabled/some not, levels, etc).
 - Allows you to choose how you use logs in your code (by defining your own LOG_ macros, suiting your application)
 - Allows you to use Log levels (debug, error, fatal, etc). However this is an orthogonal concept - the library
   will work whether you use levels, categories or whatever , or not.
@@ -36,7 +36,7 @@
     - Formatters and Destinations are orthogonal to the rest of the library - if you want you can use them, otherwise
       you can define your own writing mechanism
 - Easy manipulation of the logs (turning on/off, setting formatters, destinations, etc)
-
+- Allows you to use @ref tag "tags" (extra information about the context of the log: file/line, function name, thread id, etc.)
 
 \n\n
 @section main_common_usage Common Usage

Modified: sandbox/logging/boost/logging/detail/raw_doc/scenarios.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/raw_doc/scenarios.hpp (original)
+++ sandbox/logging/boost/logging/detail/raw_doc/scenarios.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -100,14 +100,6 @@
 \n\n\n
 
 
-_at_section common_your_scenario Your Scenario : Find out logger and filter, based on your application's needs
-
-_at_copydoc your_scenario
-
-_at_ref common_your_scenario_code "Click to see the code"
-\n\n\n
-
-
 
 @section common_scenarios_9 Scenario 9: One Thread-safe Logger, One Filter
 
@@ -125,7 +117,20 @@
 \n\n\n
 
 
+@section common_your_scenario Your Scenario : Find out logger and filter, based on your application's needs
+
+@copydoc your_scenario
+
+@ref common_your_scenario_code "Click to see the code"
+\n\n\n
+
+
+
+@section common_scenario_using_tags Using tags : file/line, thread id and time
+
+@copydoc using_tags
 
+@ref scenarios_code_using_tags "Click to see the code"
 
 */
 

Modified: sandbox/logging/boost/logging/detail/raw_doc/scenarios_code.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/raw_doc/scenarios_code.hpp (original)
+++ sandbox/logging/boost/logging/detail/raw_doc/scenarios_code.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -95,6 +95,12 @@
 
 
 
+@section scenarios_code_using_tags Using tags : file/line, thread id and time
+
+@include using_tags.cpp
+\n\n\n
+
+
 
 
 */

Modified: sandbox/logging/boost/logging/detail/raw_doc/table_of_contents.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/raw_doc/table_of_contents.hpp (original)
+++ sandbox/logging/boost/logging/detail/raw_doc/table_of_contents.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -13,13 +13,16 @@
     - @ref common_scenarios_2
     - @ref common_scenarios_3
     - @ref common_your_scenario
+ - @ref common_scenario_using_tags
     - @ref common_scenarios "More scenarios..."
     - @ref scenario_multiple_files
         - @ref scenario_multiple_files_program
         - @ref scenario_multiple_files_log_h
         - @ref scenario_multiple_files_log_cpp
         - @ref scenario_multiple_files_main
+
 - @ref scenario::usage "Choose the best filter/logger class, based on your application's needs"
+- @ref tag "Using tags"
 
 - @ref workflow
     - @ref workflow_introduction

Modified: sandbox/logging/boost/logging/detail/ts/ts_resource.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/ts/ts_resource.hpp (original)
+++ sandbox/logging/boost/logging/detail/ts/ts_resource.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -147,7 +147,7 @@
 #ifndef BOOST_LOG_NO_TSS
 
     /**
- Locks a resource, and uses TLS. This holds the value, and each thread caches it.
+ Locks a resource, and uses TSS (Thread-specific storage). This holds the value, and each thread caches it.
         Once at a given period (like, every 5 seconds), when used, the latest object is copied.
 
         @sa locker
@@ -167,7 +167,7 @@
         };
 
     public:
- tss_resource_with_cache(const type& val , int cache_secs = default_cache_secs ) : m_val(val), m_cache_secs(cache_secs) {}
+ tss_resource_with_cache(const type& val = type() , int cache_secs = default_cache_secs ) : m_val(val), m_cache_secs(cache_secs) {}
 
         struct read;
         struct write;

Modified: sandbox/logging/boost/logging/format/destination/defaults.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/destination/defaults.hpp (original)
+++ sandbox/logging/boost/logging/format/destination/defaults.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -66,13 +66,15 @@
     }
 };
 
-/**
- @brief cout_t with default values. See cout_t
+/** @brief cout_t with default values. See cout_t
+
+@copydoc cout_t
 */
 typedef cout_t<> cout;
 
-/**
- @brief dbg_window_t with default values. See dbg_window_t
+/** @brief dbg_window_t with default values. See dbg_window_t
+
+@copydoc dbg_window_t
 */
 typedef dbg_window_t<> dbg_window;
 

Modified: sandbox/logging/boost/logging/format/destination/file.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/destination/file.hpp (original)
+++ sandbox/logging/boost/logging/format/destination/file.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -105,8 +105,9 @@
     }
 };
 
-/**
-_at_brief file_t with default values. See file_t
+/** @brief file_t with default values. See file_t
+
+@copydoc file_t
 */
 typedef file_t<> file;
 

Modified: sandbox/logging/boost/logging/format/destination/rolling_file.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/destination/rolling_file.hpp (original)
+++ sandbox/logging/boost/logging/format/destination/rolling_file.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -149,8 +149,9 @@
     }
 };
 
-/**
-_at_brief rolling_file_t with default values. See rolling_file_t
+/** @brief rolling_file_t with default values. See rolling_file_t
+
+@copydoc rolling_file_t
 */
 typedef rolling_file_t<> rolling_file;
 

Modified: sandbox/logging/boost/logging/format/destination/shared_memory.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/destination/shared_memory.hpp (original)
+++ sandbox/logging/boost/logging/format/destination/shared_memory.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -124,8 +124,9 @@
 
 };
 
-/**
- @brief shared_memory_t with default values. See shared_memory_t.
+/** @brief shared_memory_t with default values. See shared_memory_t
+
+@copydoc shared_memory_t
 */
 typedef shared_memory_t<> shared_memory;
 

Modified: sandbox/logging/boost/logging/format/formatter/convert_format.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/formatter/convert_format.hpp (original)
+++ sandbox/logging/boost/logging/format/formatter/convert_format.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -25,20 +25,21 @@
 #include <boost/logging/format/optimize.hpp>
 
 namespace boost { namespace logging {
-
-template<
- class string_ ,
- class param1 ,
- class param2 ,
- class param3 ,
- class param4 ,
- class param5 ,
- class param6 ,
- class param7 ,
- class param8 ,
- class param9 ,
- class param10> struct tag_holder ;
-
+
+namespace tag {
+ template<
+ class string_ ,
+ class param1 ,
+ class param2 ,
+ class param3 ,
+ class param4 ,
+ class param5 ,
+ class param6 ,
+ class param7 ,
+ class param8 ,
+ class param9 ,
+ class param10> struct holder ;
+}
     
 namespace formatter {
 
@@ -81,7 +82,7 @@
             dest.prepend_string(src);
         }
 
- template<class string, class p1, class p2, class p3, class p4, class p5, class p6, class p7, class p8, class p9, class p10> void write(const string_type & src, ::boost::logging::tag_holder<string,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10> & dest) {
+ template<class string, class p1, class p2, class p3, class p4, class p5, class p6, class p7, class p8, class p9, class p10> void write(const string_type & src, ::boost::logging::tag::holder<string,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10> & dest) {
             write(src, static_cast<string&>(dest) );
         }
 
@@ -102,7 +103,7 @@
         template<class string> void write(const string_type & src, boost::logging::optimize::cache_string_several_str<string> & dest) {
             dest.append_string(src);
         }
- template<class string, class p1, class p2, class p3, class p4, class p5, class p6, class p7, class p8, class p9, class p10> void write(const string_type & src, ::boost::logging::tag_holder<string,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10> & dest) {
+ template<class string, class p1, class p2, class p3, class p4, class p5, class p6, class p7, class p8, class p9, class p10> void write(const string_type & src, ::boost::logging::tag::holder<string,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10> & dest) {
             write(src, static_cast<string&>(dest) );
         }
     }
@@ -125,7 +126,7 @@
         template<class string> void write(string_type & src, boost::logging::optimize::cache_string_one_str<string> & dest) {
             dest.set_string_swap(src);
         }
- template<class string, class p1, class p2, class p3, class p4, class p5, class p6, class p7, class p8, class p9, class p10> void write(const string_type & src, ::boost::logging::tag_holder<string,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10> & dest) {
+ template<class string, class p1, class p2, class p3, class p4, class p5, class p6, class p7, class p8, class p9, class p10> void write(const string_type & src, ::boost::logging::tag::holder<string,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10> & dest) {
             write(src, static_cast<string&>(dest) );
         }
     }

Modified: sandbox/logging/boost/logging/format/formatter/defaults.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/formatter/defaults.hpp (original)
+++ sandbox/logging/boost/logging/format/formatter/defaults.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -95,8 +95,22 @@
     }
 };
 
+/** @brief idx_t with default values. See idx_t
+
+@copydoc idx_t
+*/
 typedef idx_t<> idx;
+
+/** @brief append_newline_t with default values. See append_newline_t
+
+@copydoc append_newline_t
+*/
 typedef append_newline_t<> append_newline;
+
+/** @brief append_newline_if_needed_t with default values. See append_newline_if_needed_t
+
+@copydoc append_newline_if_needed_t
+*/
 typedef append_newline_if_needed_t<> append_newline_if_needed;
 
 }}}

Modified: sandbox/logging/boost/logging/format/formatter/tags.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/formatter/tags.hpp (original)
+++ sandbox/logging/boost/logging/format/formatter/tags.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -24,38 +24,168 @@
 #include <boost/logging/detail/fwd.hpp>
 #include <boost/logging/tags.hpp>
 #include <boost/logging/detail/manipulator.hpp>
-
+#include <boost/logging/format/formatter/time.hpp>
+#include <sstream>
 
 namespace boost { namespace logging { namespace formatter {
 
+
+
+/**
+ @brief Specifies that a formatter class handles a certain tag class
+
+ @param type The class itself
+ @param tag_type The tag class it handles
+*/
 template<class type, class tag_type> struct uses_tag {
     template<class tag_holder_type> void operator()(tag_holder_type & str) const {
         typedef typename tag_holder_type::string_type string_type;
         // automatic conversion - tag holder provides this
         const tag_type & tag = str;
 
- const type & self = reinterpret_cast<const type&>(*this);
+ const type & self = static_cast<const type&>(*this);
         self.write_tag(str, tag);
     }
 };
 
+/** @brief Classes that process the @ref boost::logging::tag "tags" coming with the library
+
+See @ref boost::logging::tag "how to use tags".
+*/
+namespace tag {
+
+/** @brief Dumps file/line information (corresponds to boost::logging::tag::file_line tag class)
+
+See @ref boost::logging::tag "how to use tags".
+*/
 template<class convert = do_convert_format::prepend> struct file_line_t : is_generic, uses_tag< file_line_t<convert>, ::boost::logging::tag::file_line >, boost::logging::op_equal::always_equal {
     template<class msg_type, class tag_type> void write_tag(msg_type & str, const tag_type & tag) const {
         convert::write( tag.val, str);
     }
 };
 
-typedef file_line_t<> file_line;
 
+
+/** @brief Dumps function name information (corresponds to boost::logging::tag::function tag class)
+
+See @ref boost::logging::tag "how to use tags".
+*/
 template<class convert = do_convert_format::prepend> struct function_t : is_generic, uses_tag< function_t<convert>, ::boost::logging::tag::function >, boost::logging::op_equal::always_equal {
     template<class msg_type, class tag_type> void write_tag(msg_type & str, const tag_type & tag) const {
         convert::write( tag.val, str);
     }
 };
 
+
+
+/** @brief Dumps level (corresponds to boost::logging::tag::level tag class)
+
+See @ref boost::logging::tag "how to use tags".
+*/
+template<class convert = do_convert_format::prepend> struct level_t : is_generic, uses_tag< level_t<convert>, ::boost::logging::tag::level >, boost::logging::op_equal::always_equal {
+ template<class msg_type, class tag_type> void write_tag(msg_type & str, const tag_type & tag) const {
+ typedef typename boost::logging::dump_level<>::type dump_type;
+ convert::write( dump_type::dump(tag.val) , str);
+ }
+};
+
+
+
+/** @brief Dumps current time information (corresponds to boost::logging::tag::time tag class)
+
+Similar to boost::logging::formatter::time_t class - only that this one uses tags.
+
+See @ref boost::logging::tag "how to use tags".
+*/
+template<class convert = do_convert_format::prepend> struct time_t : is_generic, uses_tag< time_t<convert>, ::boost::logging::tag::time > {
+ typedef boost::logging::formatter::time_t<convert> time_write_type;
+ time_write_type m_writer;
+
+ time_t(const hold_string_type & format) : m_writer(format) {}
+
+ template<class msg_type, class tag_type> void write_tag(msg_type & str, const tag_type & tag) const {
+ m_writer.write_time(str, tag.val);
+ }
+
+ bool operator==(const time_t & other) const {
+ return m_writer == other.m_writer ;
+ }
+
+private:
+};
+
+
+
+/** @brief Dumps module information (corresponds to boost::logging::tag::module tag class)
+
+See @ref boost::logging::tag "how to use tags".
+*/
+template<class convert = do_convert_format::prepend> struct module_t : is_generic, uses_tag< module_t<convert>, ::boost::logging::tag::module >, boost::logging::op_equal::always_equal {
+ template<class msg_type, class tag_type> void write_tag(msg_type & str, const tag_type & tag) const {
+ convert::write( tag.val, str);
+ }
+};
+
+
+
+/** @brief Dumps thread id information (corresponds to boost::logging::tag::thread_id tag class)
+
+See @ref boost::logging::tag "how to use tags".
+*/
+template<class stream_type = ::std::basic_ostringstream<char_type> , class convert = do_convert_format::prepend> struct thread_id_t
+ : is_generic, uses_tag< thread_id_t< ::std::basic_ostringstream<char_type>, convert>, ::boost::logging::tag::thread_id >, boost::logging::op_equal::always_equal {
+
+ template<class msg_type, class tag_type> void write_tag(msg_type & str, const tag_type & tag) const {
+ stream_type out;
+ out << BOOST_LOG_STR("[T") << tag.val << BOOST_LOG_STR("] ");
+ convert::write( out.str(), str);
+ }
+};
+
+
+
+
+
+
+
+/** @brief file_line_t with default values. See file_line_t
+
+@copydoc file_line_t
+*/
+typedef file_line_t<> file_line;
+
+/** @brief function_t with default values. See function_t
+
+@copydoc function_t
+*/
 typedef function_t<> function;
 
-}}}
+/** @brief level_t with default values. See level_t
+
+@copydoc level_t
+*/
+typedef level_t<> level;
+
+/** @brief time_t with default values. See time_t
+
+@copydoc time_t
+*/
+typedef time_t<> time;
+
+/** @brief module_t with default values. See module_t
+
+@copydoc module_t
+*/
+typedef module_t<> module;
+
+/** @brief thread_id_t with default values. See thread_id_t
+
+@copydoc thread_id_t
+*/
+typedef thread_id_t<> thread_id;
+
+
+}}}}
 
 #endif
 

Modified: sandbox/logging/boost/logging/format/formatter/thread_id.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/formatter/thread_id.hpp (original)
+++ sandbox/logging/boost/logging/format/formatter/thread_id.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -51,7 +51,10 @@
     }
 };
 
+/** @brief thread_id_t with default values. See thread_id_t
 
+@copydoc thread_id_t
+*/
 typedef thread_id_t<> thread_id;
 
 }}}

Modified: sandbox/logging/boost/logging/format/formatter/time.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/formatter/time.hpp (original)
+++ sandbox/logging/boost/logging/format/formatter/time.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -120,12 +120,10 @@
 
 
 
-
- template<class msg_type> void operator()(msg_type & msg) const {
+ template<class msg_type> void write_time(msg_type & msg, ::time_t val) const {
         char_type buffer[64];
 
- ::time_t t = ::time(0);
- tm details = *localtime( &t);
+ tm details = *localtime( &val);
 
         int vals[8];
         vals[m_day + 1] = details.tm_mday;
@@ -146,6 +144,11 @@
         convert::write(buffer, msg);
     }
 
+ template<class msg_type> void operator()(msg_type & msg) const {
+ ::time_t val = ::time(0);
+ write_time(msg, val);
+ }
+
     bool operator==(const time_t & other) const {
         return m_format == other.m_format;
     }
@@ -200,7 +203,16 @@
 };
 
 
+/** @brief time_t with default values. See time_t
+
+@copydoc time_t
+*/
 typedef time_t<> time;
+
+/** @brief time_strf_t with default values. See time_strf_t
+
+@copydoc time_strf_t
+*/
 typedef time_strf_t<> time_strf;
 
 }}}

Modified: sandbox/logging/boost/logging/format_fwd.hpp
==============================================================================
--- sandbox/logging/boost/logging/format_fwd.hpp (original)
+++ sandbox/logging/boost/logging/format_fwd.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -90,6 +90,31 @@
> struct logger_format_write;
 
 
+/**
+ dumps the default levels
+
+ Has a static function : dump, which dumps the level as string (works only for the default levels; for any other level, returns "")
+*/
+struct dump_default_levels {
+ static const char_type * dump(::boost::logging::level::type lvl) {
+ using namespace ::boost::logging::level;
+ switch ( lvl) {
+ case debug: return BOOST_LOG_STR("[debug] ");
+ case info: return BOOST_LOG_STR("[info] ");
+ case warning: return BOOST_LOG_STR("[warn] ");
+ case error: return BOOST_LOG_STR("[ERROR] ");
+ case fatal: return BOOST_LOG_STR("[FATAL] ");
+ default: return BOOST_LOG_STR("");
+ }
+ }
+};
+
+/**
+ Specifies the class that will dump the levels . Used by formatter::tag::level class.
+*/
+template<class T = override> struct dump_level {
+ typedef dump_default_levels type;
+};
 
 
 }}

Modified: sandbox/logging/boost/logging/macros.hpp
==============================================================================
--- sandbox/logging/boost/logging/macros.hpp (original)
+++ sandbox/logging/boost/logging/macros.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -221,16 +221,16 @@
 
 #define BOOST_LOG_STRINGIZE2(x) #x
 #define BOOST_LOG_STRINGIZE(x) BOOST_LOG_STRINGIZE2(x)
-#define BOOST_LOG_FILE_AND_LINE __FILE__ ":" BOOST_LOG_STRINGIZE(__LINE__)
+#define BOOST_LOG_FILE_AND_LINE __FILE__ ":" BOOST_LOG_STRINGIZE(__LINE__) " "
 
 
 #define BOOST_LOG_TAG(tag_type) ::boost::logging::tag:: tag_type
 
-#define BOOST_LOG_TAB_LEVEL(lvl) BOOST_LOG_TAG(level)(::boost::logging::level ::lvl )
+#define BOOST_LOG_TAG_LEVEL(lvl) BOOST_LOG_TAG(level)(::boost::logging::level ::lvl )
 
-#define BOOST_LOG_TAB_FILELINE BOOST_LOG_TAG(file_line) (BOOST_LOG_FILE_AND_LINE)
+#define BOOST_LOG_TAG_FILELINE BOOST_LOG_TAG(file_line) (BOOST_LOG_FILE_AND_LINE)
 
-#define BOOST_LOG_TAB_FUNCTION BOOST_LOG_TAG(function) (BOOST_CURRENT_FUNCTION)
+#define BOOST_LOG_TAG_FUNCTION BOOST_LOG_TAG(function) (BOOST_CURRENT_FUNCTION)
 
 
 }}

Modified: sandbox/logging/boost/logging/tag/defaults.hpp
==============================================================================
--- sandbox/logging/boost/logging/tag/defaults.hpp (original)
+++ sandbox/logging/boost/logging/tag/defaults.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -27,38 +27,57 @@
 
 namespace boost { namespace logging { namespace tag {
 
+/** @brief tag that holds file/line context information
 
+See @ref boost::logging::tag "how to use tags".
+*/
 struct file_line {
     file_line(const char * val = "") : val(val) {}
     const char * val;
 };
 
+/** @brief tag that holds function name context information
+
+See @ref boost::logging::tag "how to use tags".
+*/
+struct function {
+ function(const char* name = "") : val(name) {}
+ const char * val;
+};
+
+/** @brief tag that holds the log level context information
+
+See @ref boost::logging::tag "how to use tags".
+*/
 struct level {
     level(::boost::logging::level::type val = 0) : val(val) {}
     ::boost::logging::level::type val;
 };
 
+/** @brief tag that holds the current time context information
+
+See @ref boost::logging::tag "how to use tags".
+*/
 struct time {
     time() : val( ::time(0) ) {}
     ::time_t val;
 };
 
-struct function {
- function(const char* name = "") : val(name) {}
- const char * val;
-};
 
-template<class severity_type = int> struct severity {
- severity(severity_type val) : val(val) {}
- severity_type val;
-};
+/** @brief tag that holds module context information (note: you need to specify the module yourself)
 
+See @ref boost::logging::tag "how to use tags".
+*/
 struct module {
     module(const char* name = "") : val(name) {}
     const char * val;
 };
 
 
+/** @brief tag that holds thread id context information
+
+See @ref boost::logging::tag "how to use tags".
+*/
 struct thread_id {
     thread_id() {
 #if defined (BOOST_HAS_WINTHREADS)

Modified: sandbox/logging/boost/logging/tags.hpp
==============================================================================
--- sandbox/logging/boost/logging/tags.hpp (original)
+++ sandbox/logging/boost/logging/tags.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -50,10 +50,201 @@
     };
 }
 
+/**
+@brief Allows you to use tags (extra information about the context of the logged message: file/line, function name, thread id, etc.), and log this information as well
+
+- @ref tag_need
+- @ref tag_explained
+ - @ref tag_classes
+ - @ref tag_tag_holder
+ - @ref tag_adding_tags
+ - @ref tag_process_tags
+ - @ref tag_see_example
+
+@section tag_need Do you need tags?
+
+First of all, note that the easiest way to log some extra context is to simply append it, when definining your macro:
+
+@code
+#define LDBG_ BOOST_LOG_USE_LOG_IF_LEVEL(g_l, g_log_level, debug ) << __FILE__ << ":" << __LINE__ << " [dbg] "
+@endcode
+
+In the above case, you appended file & line, and the level of the logged message. Usage is just the same:
+
+@code
+std::string hello = "hello", world = "world";
+LAPP_ << hello << ", " << world;
+@endcode
+
+The output could look like:
+
+@code
+my_cool_sample:234 [dbg] hello, world
+@endcode
+
+I can see a few issues with the above
+- The context formatting is fixed
+ - You can't choose at runtime - I want to see the level first, then the file & line
+ - You can't choose at runtime if you want to ignore some of that context (to speed up the app in some cases, you might decide not to log the file & line)
+ - You can't mix the context formatting with the rest of the formatting. For example, what if I want to log info like this : \n
+ <tt>[idx] file_and_line [time] [level] message</tt> ?
+ - You can't do extra formatting to any of the context. For example, when dumping file/line,
+ what if you want to strip some information from the file (the file name could be pretty big). Or, you might want to @em normalize
+ the file/line (like, fix it at 50 chars - by stripping or padding information)
+- If you want to be efficient and do the logging on a @ref boost::logging::writer::on_dedicated_thread "dedicated thread"
+ - You can't use formatter::thread_id, because the thread_id is computed when being written (which when used on a dedicated thread, would always
+ return the same value)
+ - Logging the context takes time as well. For instance, <tt>" << __FILE__ << ":" << __LINE__ << " [dbg] "</tt> , in the above case,
+ takes time. It is much faster to only @em gather the context on the current thread, and then dump it on the dedicated thread. You can use tags for that.
+
+If you're ok with the above issues, no need to delve into tags. You can dump context like shown above, and be fine with it.
+
+Otherwise, welcome to the world of @b tags!
+
+@section tag_explained Tags - explained
+
+@code
+#include <boost/logging/tags.hpp>
+@endcode
+
+
+
+@subsection tag_classes Tag classes
+
+Each single context information you need to hold, is identified by a tag class. Tag classes are always found in the boost::logging::tag namespace.
+
+A tag class is deadly simple. Here are a few examples:
+
+@code
+struct file_line {
+ file_line(const char * val = "") : val(val) {}
+ const char * val;
+};
+
+struct time {
+ time() : val( ::time(0) ) {}
+ ::time_t val;
+};
+@endcode
+
+They only allow holding the context, and making sure you can get to it - when doing formatting. You can of course add your own tag clases.
+
+
+
+@subsection tag_tag_holder Tag Holder - holding the tags
+
+Now, you have to decide what tags you need. You will use templated class tag::holder:
+- first param: the string class
+- the next params: the tags you need
+
+You will replace your old <tt>BOOST_LOG_FORMAT_MSG(string_class)</tt> usage, with tags. In case you don't have a BOOST_LOG_FORMAT_MSG in your
+application, the string_class is std::(w)string.
+
+@code
+// old
+BOOST_LOG_FORMAT_MSG( optimize::cache_string_one_str<> )
+
+// new - use tags
+//
+// In our case, time, file/line, function name
+typedef tag::holder< optimize::cache_string_one_str<>, tag::time, tag::file_line, tag::function> string;
+BOOST_LOG_FORMAT_MSG( string )
+@endcode
+
+
+
+@subsection tag_adding_tags Adding tags to your LOG macros
+
+Some tag classes compute their context automatically (for instance, the tag::time class). However, some tag classes need you to manually specify it,
+in your LOG macros. This is the case for file/line, function, level, etc.
+
+In your LOG macros, you need to append the tags like this:
+- add <tt>.set_tag( <em>tag_class( tag_init_values)</em> ) </tt>
+- if it's a tag class defined in the boost::logging::tag namespace, you can use BOOST_LOG_TAG(class_name) \n
+ (which is just a shortcut for ::boost::logging::tag::class_name)
+- some tags that come with the lib have shortcuts :
+ - BOOST_LOG_TAG_LEVEL(lvl) - append the level
+ - BOOST_LOG_TAG_FILELINE - append file/line
+ - BOOST_LOG_TAG_FUNCTION - append function
+
+Examples:
+
+@code
+// add file/line and function tags
+#define L_ BOOST_LOG_USE_LOG_IF_FILTER(g_l, g_log_filter->is_enabled() ) .set_tag(BOOST_LOG_TAG_FILELINE) .set_tag(BOOST_LOG_TAG_FUNCTION)
+
+// add function and level
+#define LDBG_ BOOST_LOG_USE_LOG_IF_LEVEL(g_log_dbg, g_log_level, debug ) .set_tag(BOOST_LOG_TAG_FUNCTION) .set_tag( BOOST_LOG_TAG_LEVEL(debug) )
+
+// add module information - you specify the module name whe using the L_ macro. Example:
+// L_("chart") << "Initializing environment";
+#define L_(module_name) BOOST_LOG_USE_LOG_IF_FILTER(g_l, g_log_filter->is_enabled() ) .set_tag( BOOST_LOG_TAG(module)(module_name) )
+
+@endcode
+
+
+
+@subsection tag_process_tags Processing the tags
+
+Now, you're ready to process these tags - where you're specifying your formatters and/or destinations, add the tag formatters that will process your tags.
+Example:
+
+@code
+#include <boost/logging/format/formatter/tags.hpp>
+...
+
+g_l->writer().add_formatter( formatter::idx() );
+g_l->writer().add_formatter( formatter::append_newline() );
+
+// formatters to add the file/line and level
+g_l->writer().add_formatter( formatter::tag::file_line() );
+g_l->writer().add_formatter( formatter::tag::level() );
+
+g_l->writer().add_destination( destination::file("out.txt") );
+g_l->writer().add_destination( destination::cout() );
+g_l->writer().add_destination( destination::dbg_window() );
+@endcode
+
+Note that the library comes with default formatters for each tag class. However, you can create your own formatter class, for a given tag class.
+
+The formatters that come with the library, have the same name as the tag class itself, only that they're in the @c formatter::tag namespace.
+
+Examples:
+- for tag::file_line, we have formatter::tag::file_line
+- for tag::function, we have formatter::tag::function
+
+When adding the formatters, don't forget to:
+
+@code
+#include <boost/logging/format/formatter/tags.hpp>
+@endcode
+
+
+@subsection tag_see_example Example using Tags
+
+@copydoc using_tags
+
+@ref scenarios_code_using_tags "Click to see the code"
+
+That's it, enjoy!
+
+*/
+namespace tag {
+
 /** @brief Holds up to 10 @ref tag "tags".
 
 @param string_ The string class we use for holding logged messages. By default, std::(w)string. What you used to specify using BOOST_LOG_FORMAT_MSG.
 
+@param param1 (optional) First tag
+@param param2 (optional) Second tag
+@param param3 (optional) Third tag
+@param param4 (optional) Fourth tag
+@param param5 (optional) Fifth tag
+@param param6 (optional) Sixth tag
+@param param7 (optional) Seventh tag
+@param param8 (optional) Eith tag
+@param param9 (optional) Nineth tag
+@param param10 (optional) Tenth tag
 */
 template<
         class string_ = default_,
@@ -66,7 +257,7 @@
         class param7 = detail::void_7,
         class param8 = detail::void_8,
         class param9 = detail::void_9,
- class param10 = detail::void_10> struct tag_holder : detail::tag_holder_base<string_> {
+ class param10 = detail::void_10> struct holder : detail::tag_holder_base<string_> {
     typedef typename use_default<string_, hold_string_type>::type string_type;
     typedef detail::tag_holder_base<string_> tag_base_type;
 
@@ -84,7 +275,7 @@
     operator const param9& () const { return m_tag9; }
     operator const param10& () const { return m_tag10; }
 
- template<class tag_type> tag_holder& set_tag(const tag_type & val) {
+ template<class tag_type> holder& set_tag(const tag_type & val) {
         set_tag_impl(val);
         return *this;
     }
@@ -143,7 +334,7 @@
 };
 
 
-}}
+}}}
 
 #include <boost/logging/tag/defaults.hpp>
 

Modified: sandbox/logging/boost/logging/writer/on_dedicated_thread.hpp
==============================================================================
--- sandbox/logging/boost/logging/writer/on_dedicated_thread.hpp (original)
+++ sandbox/logging/boost/logging/writer/on_dedicated_thread.hpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -31,6 +31,9 @@
 
 namespace boost { namespace logging { namespace writer {
 
+/** @file boost/logging/writer/on_dedidcated_thread.hpp
+*/
+
 namespace detail {
     template<class msg_type> struct dedicated_thread_context {
         dedicated_thread_context() : is_working(true), write_period_ms(100) {}
@@ -54,13 +57,32 @@
 /**
 @brief Performs all writes on a dedicated thread - very efficient and <b>thread-safe</b>.
 
-<tt>\#include <boost/logging/writer/on_dedidcated_thread.hpp> </tt>
+<tt>\#include <boost/logging/writer/on_dedicated_thread.hpp> </tt>
 
 Keeps locks in the worker threads to a minimum:
 whenever a message is logged, is put into a queue (this is how long the lock lasts).
-Then, a dedicated thread reads the queue, and processes it one by one.
+Then, a dedicated thread reads the queue, and processes the messages (applying formatters and destinations if needed).
+
+@section on_dedicated_thread_logger Transforming a logger into on-dedicated-thread writer
+
+To transform a @b logger into on-dedicated-thread (thread-safe) writer, simply specify @c on_dedicated_thread as the thread safety:
+
+@code
+typedef logger_format_write< default_, default_, writer::threading::on_dedicated_thread > log_type;
+@endcode
+
+Of if you're using @ref boost::logging::scenario::usage scenarios, specify @c speed for the @c logger::favor_ :
+@code
+using namespace boost::logging::scenario::usage;
+typedef use< ..., ..., ..., logger_::favor::speed> finder;
+@endcode
 
-To transform a writer into on-dedicated-thread thread-safe writer, simply surround the writer with on_dedicated_thread:
+
+
+\n\n
+@section on_dedicated_thread_writer Transforming a writer into on-dedicated-thread writer
+
+To transform a @b writer into on-dedicated-thread thread-safe writer, simply surround the writer with @c on_dedicated_thread:
 
 Example:
 
@@ -72,19 +94,13 @@
 
 // thread-safe, on dedicated thread
 logger< string, on_dedicated_thread<string,write_to_cout> > g_l;
-
-
-// not thread-safe
-logger<
- string ,
- format_write<format_base, destination_base> > g_l;
-
-// thread-safe, on dedicated thread
-logger<
- string ,
- on_dedicated_thread<string, format_write< format_base, destination_base> > > g_l;
 @endcode
 
+You should note that a @b writer is not necessary a %logger. It can be a destination, for instance. For example, you might have a destination
+where writing is time consuming, while writing to the rest of the destinations is very fast.
+You can choose to write to all but that destination on the current thread, and to that destination on a dedicated thread.
+(If you want to write to all destinations on a different thread, we can go back to @ref on_dedicated_thread_logger "transforming a logger...")
+
 */
 template<class msg_type, class base_type>
 struct on_dedicated_thread

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 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -510,6 +510,7 @@
>
                                 <FileConfiguration
                                         Name="Test|Win32"
+ ExcludedFromBuild="true"
>
                                         <Tool
                                                 Name="VCCLCompilerTool"
@@ -1021,6 +1022,17 @@
                                 </FileConfiguration>
                         </File>
                         <File
+ RelativePath="..\..\..\samples\scenarios\using_tags.cpp"
+ >
+ <FileConfiguration
+ Name="Test|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
                                 RelativePath="..\..\..\samples\scenarios\your_scenario.cpp"
>
                                 <FileConfiguration

Added: sandbox/logging/lib/logging/samples/scenarios/using_tags.cpp
==============================================================================
--- (empty file)
+++ sandbox/logging/lib/logging/samples/scenarios/using_tags.cpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -0,0 +1,110 @@
+// using_tags.cpp
+//
+// Shows how easy it is to use tags, using the Boost Logging Lib
+
+// Boost Logging library
+//
+// Author: John Torjo, www.torjo.com
+//
+// Copyright (C) 2007 John Torjo (see www.torjo.com for email)
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org for updates, documentation, and revision history.
+// See http://www.torjo.com/log2/ for more details
+
+
+/**
+@example using_tags.cpp
+
+@copydoc using_tags
+
+@page using_tags using_tags.cpp Example
+
+
+This usage:
+- You have one logger and one filter, which can be turned on or off
+- You want to format the message before it's written
+- The logger has several log destinations
+ - The output goes to console, and a file called out.txt
+ - Formatting - message will look like this: <tt>[file/line] [thread_id] [idx] [time] message [enter] </tt>
+
+Optimizations:
+- use a cache string (from optimize namespace), in order to make formatting the message faster
+
+In this example, all output will be written to the console, debug window, and "out.txt" file.
+The output can look like:
+
+@code
+logging\samples\scenarios\using_tags.cpp:94 [T7204] [1] 14:55 this is so cool 1
+logging\samples\scenarios\using_tags.cpp:95 [T7204] [2] 14:55 this is so cool again 2
+@endcode
+
+*/
+
+
+
+#define BOOST_LOG_COMPILE_FAST_OFF
+#include <boost/logging/format_fwd.hpp>
+#include <boost/logging/tags.hpp>
+
+// Step 1: Optimize : use a cache string, to make formatting the message faster
+namespace bl = boost::logging;
+typedef bl::tag::holder< bl::optimize::cache_string_one_str<>, bl::tag::file_line, bl::tag::thread_id, bl::tag::time> log_string;
+BOOST_LOG_FORMAT_MSG( log_string )
+
+
+#include <boost/logging/format.hpp>
+#include <boost/logging/writer/ts_write.hpp>
+#include <boost/logging/format/formatter/tags.hpp>
+
+using namespace boost::logging;
+
+// Step 3 : Specify your logging class(es)
+using namespace boost::logging::scenario::usage;
+typedef use<default_,filter_::level::no_levels> finder;
+
+// Step 4: declare which filters and loggers you'll use (usually in a header file)
+BOOST_DECLARE_LOG_FILTER(g_log_filter, finder::filter )
+BOOST_DECLARE_LOG(g_l, finder::logger)
+
+// Step 5: define the macros through which you'll log
+#define L_ BOOST_LOG_USE_LOG_IF_FILTER(g_l, g_log_filter->is_enabled() ) .set_tag( BOOST_LOG_TAG_FILELINE)
+
+// Step 6: Define the filters and loggers you'll use (usually in a source file)
+BOOST_DEFINE_LOG_FILTER(g_log_filter, finder::filter )
+BOOST_DEFINE_LOG(g_l, finder::logger)
+
+
+void using_tags_example() {
+ // Step 7: add formatters and destinations
+ // That is, how the message is to be formatted and where should it be written to
+ g_l->writer().add_formatter( formatter::tag::time("$mm:$ss ") ); // time tag
+ g_l->writer().add_formatter( formatter::idx() );
+ g_l->writer().add_formatter( formatter::tag::thread_id() ); // thread_id tag
+ g_l->writer().add_formatter( formatter::tag::file_line() ); // file/line tag
+ g_l->writer().add_formatter( formatter::append_newline() );
+ g_l->writer().add_destination( destination::cout() );
+ g_l->writer().add_destination( destination::file("out.txt") );
+
+ // Step 8: use it...
+ int i = 1;
+ L_ << "this is so cool " << i++;
+ L_ << "this is so cool again " << i++;
+ // Step 9 : Enjoy!
+}
+
+
+
+#ifdef SINGLE_TEST
+
+int main() {
+ using_tags_example();
+}
+
+#endif
+
+// End of file
+

Modified: sandbox/logging/lib/logging/tests/do_not_use/testfast.cpp
==============================================================================
--- sandbox/logging/lib/logging/tests/do_not_use/testfast.cpp (original)
+++ sandbox/logging/lib/logging/tests/do_not_use/testfast.cpp 2007-11-10 12:41:24 EST (Sat, 10 Nov 2007)
@@ -23,7 +23,7 @@
 #include <boost/logging/tags.hpp>
 
 using namespace boost::logging;
-typedef tag_holder< optimize::cache_string_one_str<>, tag::time, tag::file_line, tag::function> string;
+typedef tag::holder< optimize::cache_string_one_str<>, tag::time, tag::file_line, tag::function> string;
 
 // Step 1: Optimize : use a cache string, to make formatting the message faster
 BOOST_LOG_FORMAT_MSG( string )
@@ -43,15 +43,15 @@
 BOOST_DEFINE_LOG_FILTER(g_log_filter, filter::no_ts )
 BOOST_DEFINE_LOG(g_l, log_type)
 
-#define L_ BOOST_LOG_USE_LOG_IF_FILTER(g_l, g_log_filter->is_enabled() ) .set_tag(BOOST_LOG_TAB_FILELINE ).set_tag(BOOST_LOG_TAB_FUNCTION)
+#define L_ BOOST_LOG_USE_LOG_IF_FILTER(g_l, g_log_filter->is_enabled() ) .set_tag(BOOST_LOG_TAG_FILELINE ).set_tag(BOOST_LOG_TAG_FUNCTION)
 
 
 
 void your_scenario_example() {
 
     g_l->writer().add_formatter( formatter::idx() );
-// g_l->writer().add_formatter( formatter::file_line() );
- g_l->writer().add_formatter( formatter::function() );
+// g_l->writer().add_formatter( formatter::tag::file_line() );
+ g_l->writer().add_formatter( formatter::tag::function() );
     g_l->writer().add_formatter( formatter::append_newline() );
     g_l->writer().add_destination( destination::file("out.txt") );
     g_l->writer().add_destination( destination::cout() );


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