|
Boost-Commit : |
From: john.groups_at_[hidden]
Date: 2007-10-22 02:08:36
Author: jtorjo
Date: 2007-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
New Revision: 40275
URL: http://svn.boost.org/trac/boost/changeset/40275
Log:
[logging]
v0.8.1, 22 oct 2007
- added one more common scenario
- finally figured out how I can add examples using doxygen :)
Added:
sandbox/logging/boost/logging/detail/raw_doc/common_usage_steps_fd.hpp (contents, props changed)
sandbox/logging/boost/logging/detail/raw_doc/scenarios.hpp (contents, props changed)
sandbox/logging/boost/logging/detail/raw_doc/scenarios_code.hpp (contents, props changed)
sandbox/logging/lib/logging/samples/scenarios/mul_levels_mul_logers.cpp (contents, props changed)
Removed:
sandbox/logging/boost/logging/detail/raw_doc/common_usage.hpp
Text files modified:
sandbox/logging/boost/logging/detail/raw_doc/Doxyfile.txt | 15 +++++----
sandbox/logging/boost/logging/detail/raw_doc/fixme.hpp | 9 +++--
sandbox/logging/boost/logging/detail/raw_doc/main.hpp | 20 +++++-------
sandbox/logging/boost/logging/detail/raw_doc/table_of_contents.hpp | 6 ++-
sandbox/logging/boost/logging/format/formatter/convert_format.hpp | 6 +-
sandbox/logging/boost/logging/format/formatter/defaults.hpp | 2
sandbox/logging/boost/logging/macros.hpp | 9 +++--
sandbox/logging/lib/logging/samples/scenarios/mul_levels_one_logger.cpp | 61 +++++++++++++++++++++++----------------
sandbox/logging/lib/logging/samples/vc8/loggingvc8/loggingvc8.vcproj | 26 ++++++++++++++++
sandbox/logging/lib/logging/src/changelog.txt | 7 ++++
10 files changed, 103 insertions(+), 58 deletions(-)
Modified: sandbox/logging/boost/logging/detail/raw_doc/Doxyfile.txt
==============================================================================
--- sandbox/logging/boost/logging/detail/raw_doc/Doxyfile.txt (original)
+++ sandbox/logging/boost/logging/detail/raw_doc/Doxyfile.txt 2007-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -4,16 +4,16 @@
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
-PROJECT_NAME = "Boost Logging Library v2 "
+PROJECT_NAME = "Boost Logging Library v2 "
PROJECT_NUMBER =
OUTPUT_DIRECTORY = ../../../../lib/logging/doc
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF = "The $name class " \
- "The $name widget " \
- "The $name file " \
+ABBREVIATE_BRIEF = "The $name class " \
+ "The $name widget " \
+ "The $name file " \
is \
provides \
specifies \
@@ -80,12 +80,13 @@
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text "
+WARN_FORMAT = "$file:$line: $text "
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
-INPUT = ../..
+INPUT = ../.. \
+ ../../../../lib/logging/samples/scenarios
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \
*.cc \
@@ -119,7 +120,7 @@
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
-EXAMPLE_PATH =
+EXAMPLE_PATH = ../../../../lib/logging/samples/scenarios
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
Deleted: sandbox/logging/boost/logging/detail/raw_doc/common_usage.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/raw_doc/common_usage.hpp 2007-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
+++ (empty file)
@@ -1,33 +0,0 @@
-namespace boost { namespace logging {
-
-/**
-_at_page common_usage Scenario 1: Common Usage
-
-Scenario 1 should be the most common:
-- You have multiple levels (in this example: debug < info < error)
-- You want to format the message before it's written
- (in this example: prefix it by index, by time, and append an enter to it)
-- You have <b>one log</b>, which writes to several log destinations
- (in this example: the console, the output window, and a file
-
-In our example, the output will be written to the console, debug window, and "out.txt" file.
-It will look similar to this one:
-
-_at_code
-12:59.27 [1] this is so cool 1
-12:59.27 [2] hello, world
-12:59.27 [3] good to be back ;) 2
-_at_endcode
-
-To take a look at the code for example, see:
-
-_at_htmlonly
-Scenario 1 Code
-_at_endhtmlonly
-
-
-
-
-*/
-
-}}
Added: sandbox/logging/boost/logging/detail/raw_doc/common_usage_steps_fd.hpp
==============================================================================
--- (empty file)
+++ sandbox/logging/boost/logging/detail/raw_doc/common_usage_steps_fd.hpp 2007-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -0,0 +1,20 @@
+namespace boost { namespace logging {
+
+/**
+@page common_usage_steps_fd Common steps when using Formatters and destinations
+
+The usual steps when using the Boost Logging Lib are:
+- Step 1: Specify your @ref boost::logging::manipulator "formatter & destination base classes"
+- Step 2: Define your logger class(es)
+- Step 3: Define your filters (for instance, if you use levels, use a level::holder)
+- Step 4: Declare which loggers you'll use (in a header file)
+- Step 5: Define which loggers you'll use (in a source file). We need this separation
+ (into Step 4 and 5, in order to make compilation times fast)
+- Step 6: Define the macros through which you'll log
+- Step 7: Add @ref boost::logging::manipulator "formatters and destinations". That is, how the message is to be formatted...
+- Step 8: Use it
+- Step 9: Enjoy the results!
+
+*/
+
+}}
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-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -1,4 +1,7 @@
/*
+
+
+
FIXME change the workflow & logger's definition - it doesn't need a filter, but it can have one!
@@ -6,19 +9,17 @@
scenarios:
have 3 scenarios
-- several levels, same log
-- several levels, different logs
- with custom router FIXME (that is, use cache_string_several_str())
- one logger; several levels - use a sink (that is, see how we find "is_enabled")
- we can simply use the level.is_enabled(xxx) question, and then write to the log
- no levels
-- etc
- fastest , no <<
- fastest , using <<
- using your own formatters and destinations integrated
+--> doxygen_web -> copy from doxygen, once all is done, and examples finally work
-FIXME after showing scenarios, show customizing?
+------> FIXME after showing scenarios, show customizing?
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-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -4,8 +4,7 @@
@page main_intro Boost Logging Library v2 : Introduction
- @ref main_motivation
-- @ref main_example1
-- @ref main_example2
+- @ref main_common_usage
@section main_motivation Motivation
@@ -37,20 +36,19 @@
you can define your own writing mechanism
- Easy manipulation of the logs (turning on/off, setting formatters, destinations, etc)
-_at_section main_example1 Example 1 (Common Scenario)
-First example is the common scenario:
-- You have multiple levels
-- You want to format the message before it's written
-- You have <b>one log</b>, which writes to several log destinations
+\n\n
+@section main_common_usage Common Usage
-_at_ref common_usage "Take a look"
+To get you started, here's the <b>most common usage</b>:
+\n
-_at_section main_example2 Example 2
-
-More examples coming soon!
+@copydoc mul_levels_one_logger
+@ref scenarios_code_1 "Click to see the code"
+\n\n\n
+To see more examples, check out @ref common_scenarios.
*/
Added: sandbox/logging/boost/logging/detail/raw_doc/scenarios.hpp
==============================================================================
--- (empty file)
+++ sandbox/logging/boost/logging/detail/raw_doc/scenarios.hpp 2007-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -0,0 +1,30 @@
+namespace boost { namespace logging {
+
+/**
+@page common_scenarios Usage Scenarios
+
+- @ref common_scenarios_1
+- @ref common_scenarios_2
+
+@copydoc common_usage_steps_fd
+
+@section common_scenarios_1 Common usage: Multiple levels, One logging class, Multiple destinations.
+
+Scenario 1 should be the most common.
+
+@copydoc mul_levels_one_logger
+
+@ref scenarios_code_1 "Click to see the code"
+\n\n\n
+
+@section common_scenarios_2 Scenario 2: Multiple levels, Multiple logging classes, Multiple destinations.
+
+@copydoc mul_levels_mul_logers
+
+@ref scenarios_code_2 "Click to see the code"
+\n\n\n
+
+
+*/
+
+}}
Added: sandbox/logging/boost/logging/detail/raw_doc/scenarios_code.hpp
==============================================================================
--- (empty file)
+++ sandbox/logging/boost/logging/detail/raw_doc/scenarios_code.hpp 2007-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -0,0 +1,24 @@
+namespace boost { namespace logging {
+
+/**
+@page scenarios_code Code for the common scenarios
+
+- @ref scenarios_code_1
+- @ref scenarios_code_2
+
+
+
+@section scenarios_code_1 Common usage: Multiple levels, One logging class, Multiple destinations.
+
+@include mul_levels_one_logger.cpp
+\n\n\n
+
+@section scenarios_code_2 Scenario 2: Multiple levels, Multiple logging classes, Multiple destinations
+
+@include mul_levels_mul_logers.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-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -6,8 +6,10 @@
- @ref main_intro
- @ref main_motivation
- - @ref main_example1
- - @ref main_example2
+- @ref common_scenarios
+ - @ref common_scenarios_1
+ - @ref common_scenarios_2
+
- @ref workflow
- @ref workflow_introduction
- @ref workflow_filter
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-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -98,19 +98,19 @@
typedef std::basic_string<char_type> string_type;
struct prepend {
- template<class string> static void write(const string_type & src, string & dest) {
+ template<class src_type, class string> static void write(const src_type & src, string & dest) {
convert::prepend::write(src, dest);
}
};
struct append {
- template<class string> static void write(const string_type & src, string & dest) {
+ template<class src_type, class string> static void write(const src_type & src, string & dest) {
convert::append::write(src, dest);
}
};
struct modify {
- template<class string> static void write(const string_type & src, string & dest) {
+ template<class src_type, class string> static void write(const src_type & src, string & dest) {
convert::modify::write(src, 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-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -67,7 +67,7 @@
@param convert [optional] In case there needs to be a conversion between std::(w)string and the string that holds your logged message. See convert_format.
For instance, you might use @ref boost::logging::optimize::cache_string_one_str "a cached_string class" (see @ref boost::logging::optimize "optimize namespace").
*/
-template<class convert = do_convert_format::prepend> struct append_enter_t : is_generic, boost::logging::op_equal::always_equal {
+template<class convert = do_convert_format::append> struct append_enter_t : is_generic, boost::logging::op_equal::always_equal {
template<class msg_type> void operator()(msg_type & str) const {
convert::write( (const char_type*)BOOST_LOGGING_STR("\n"), str );
}
Modified: sandbox/logging/boost/logging/macros.hpp
==============================================================================
--- sandbox/logging/boost/logging/macros.hpp (original)
+++ sandbox/logging/boost/logging/macros.hpp 2007-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -95,19 +95,20 @@
#ifdef BOOST_LOGGING_COMPILE_FAST
// FIXME need to reimplement them when using compile_fast
-#define BOOST_DECLARE_LOG(name,type) type& name ## _boost_log_impl_(); extern boost::logging::detail::log_keeper<type, name ## _boost_log_impl_ > g_l;
+#define BOOST_DECLARE_LOG(name,type) type& name ## _boost_log_impl_(); extern boost::logging::detail::log_keeper<type, name ## _boost_log_impl_ > name;
#define BOOST_DEFINE_LOG(name,type) type& name ## _boost_log_impl_() \
{ static type i; return i; } \
namespace { boost::logging::detail::fake_using_log ensure_log_is_created_before_main ## name ( name ## _boost_log_impl_() ); } \
- boost::logging::detail::log_keeper<type, name ## _boost_log_impl_ > g_l;
+ boost::logging::detail::log_keeper<type, name ## _boost_log_impl_ > name;
#else
-#define BOOST_DECLARE_LOG(name,type) type& name ## _boost_log_impl_(); extern boost::logging::detail::log_keeper<type, name ## _boost_log_impl_ > g_l;
+// FIXME need to reimplement them when using compile_fast
+#define BOOST_DECLARE_LOG(name,type) type& name ## _boost_log_impl_(); extern boost::logging::detail::log_keeper<type, name ## _boost_log_impl_ > name;
#define BOOST_DEFINE_LOG(name,type) type& name ## _boost_log_impl_() \
{ static type i; return i; } \
namespace { boost::logging::detail::fake_using_log ensure_log_is_created_before_main ## name ( name ## _boost_log_impl_() ); } \
- boost::logging::detail::log_keeper<type, name ## _boost_log_impl_ > g_l;
+ boost::logging::detail::log_keeper<type, name ## _boost_log_impl_ > name;
#endif
Added: sandbox/logging/lib/logging/samples/scenarios/mul_levels_mul_logers.cpp
==============================================================================
--- (empty file)
+++ sandbox/logging/lib/logging/samples/scenarios/mul_levels_mul_logers.cpp 2007-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -0,0 +1,168 @@
+// test_mul_levels_mul_logers.hpp
+//
+// A test of the Logging library with multiple levels and multiple logging classes (each writing to multiple destinations).
+
+// 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 mul_levels_mul_logers.cpp
+
+ @copydoc mul_levels_mul_logers
+
+ @page mul_levels_mul_logers mul_levels_mul_logers.cpp Example
+
+
+ This usage:
+ - You have multiple levels (in this example: debug < info < error)
+ - You want to format the message before it's written
+ (in this example: prefix it by index, by time, and append an enter to it)
+ - You have several loggers
+ - Each logger has several log destinations
+
+ Optimizations:
+ - use a cache string (from optimize namespace), in order to make formatting the message faster
+
+ Logs:
+ - Error messages go into err.txt file
+ - formatting - prefix each message by time, index, and append enter
+ - Info output goes to console, and a file called out.txt
+ - formatting - prefix each message by "[app]", time, and append enter
+ - Debug messages go to the debug output window, and a file called out.txt
+ - formatting - prefix each message by "[dbg]", time, and append enter
+
+
+ Here's how the output will look like:
+
+ The output window:
+ @code
+ 07:52.30 [dbg] this is so cool 1
+ 07:52.30 [dbg] this is so cool again 2
+ @endcode
+
+
+ The console:
+ @code
+ 07:52.30 [app] hello, world
+ 07:52.30 [app] good to be back ;) 4
+ @endcode
+
+
+ The out.txt file:
+ @code
+ 07:52.30 [dbg] this is so cool 1
+ 07:52.30 [dbg] this is so cool again 2
+ 07:52.30 [app] hello, world
+ 07:52.30 [app] good to be back ;) 4
+ @endcode
+
+
+ The err.txt file
+ @code
+ 07:52.30 [1] first error 3
+ 07:52.30 [2] second error 5
+ @endcode
+*/
+
+
+
+#define BOOST_LOGGING_COMPILE_FAST_OFF
+#include <boost/logging/logging.hpp>
+#include <boost/logging/format.hpp>
+
+using namespace boost::logging;
+
+// Optimize : use a cache string, to make formatting the message faster
+typedef optimize::cache_string_one_str<> cache_string;
+
+// Step 1: specify your formatter & destination base classes
+typedef formatter::base< cache_string& > formatter_base;
+typedef destination::base< const std::string & > destination_base;
+
+// Step 2 : define your logging class(es)
+typedef logger< use_format_write<formatter_base,destination_base> > log_type;
+
+// Step 3 : If you use levels, Set up a log level holder
+level::holder g_log_level; // holds the application log level
+
+// Step 4: declare which loggers you'll use
+BOOST_DECLARE_LOG(g_log_err, log_type) // normally these go into a header file ;)
+BOOST_DECLARE_LOG(g_log_app, log_type)
+BOOST_DECLARE_LOG(g_log_dbg, log_type)
+
+// Step 5: define which loggers you'll use
+BOOST_DEFINE_LOG(g_log_err, log_type)
+BOOST_DEFINE_LOG(g_log_app, log_type)
+BOOST_DEFINE_LOG(g_log_dbg, log_type)
+
+// Step 6: define the macros through which you'll log
+#define LDBG_ BOOST_LOG_USE_LOG_IF_LEVEL(g_log_dbg, g_log_level, debug ) << "[dbg] "
+#define LERR_ BOOST_LOG_USE_LOG_IF_LEVEL(g_log_err, g_log_level, error )
+#define LAPP_ BOOST_LOG_USE_LOG_IF_LEVEL(g_log_app, g_log_level, info ) << "[app] "
+
+void test_mul_levels_one_logger() {
+ // Step 7: add formatters and destinations
+ // That is, how the message is to be formatted and where should it be written to
+
+ // Err log
+ g_log_err->writer().add_formatter( formatter::idx() );
+ g_log_err->writer().add_formatter( formatter::time("$hh:$mm.$ss ") );
+ g_log_err->writer().add_formatter( formatter::append_enter() );
+ g_log_err->writer().add_destination( destination::file("err.txt") );
+
+ destination::file out("out.txt");
+ // App log
+ g_log_app->writer().add_formatter( formatter::time("$hh:$mm.$ss ") );
+ g_log_app->writer().add_formatter( formatter::append_enter() );
+ g_log_app->writer().add_destination( out );
+ g_log_app->writer().add_destination( destination::cout() );
+
+ // Inf log
+ g_log_dbg->writer().add_formatter( formatter::time("$hh:$mm.$ss ") );
+ g_log_dbg->writer().add_formatter( formatter::append_enter() );
+ g_log_dbg->writer().add_destination( out );
+ g_log_dbg->writer().add_destination( destination::dbg_window() );
+
+ // Step 8: use it...
+ int i = 1;
+ LDBG_ << "this is so cool " << i++;
+ LDBG_ << "this is so cool again " << i++;
+ LERR_ << "first error " << i++;
+
+ std::string hello = "hello", world = "world";
+ LAPP_ << hello << ", " << world;
+
+ g_log_level.set_enabled(level::error);
+ LDBG_ << "this will not be written anywhere";
+ LAPP_ << "this won't be written anywhere either";
+
+ g_log_level.set_enabled(level::info);
+ LAPP_ << "good to be back ;) " << i++;
+ LERR_ << "second error " << i++;
+
+ // Step 9 : Enjoy!
+}
+
+
+
+#ifdef SINGLE_TEST
+
+int main() {
+ test_mul_levels_one_logger();
+}
+
+#endif
+
+// End of file
+
Modified: sandbox/logging/lib/logging/samples/scenarios/mul_levels_one_logger.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/scenarios/mul_levels_one_logger.cpp (original)
+++ sandbox/logging/lib/logging/samples/scenarios/mul_levels_one_logger.cpp 2007-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -1,4 +1,6 @@
// test_mul_levels_one_logger.hpp
+//
+// A test of the Logging library with multiple levels and one logging class writing to multiple destinations.
// Boost Logging library
//
@@ -13,45 +15,63 @@
// See http://www.boost.org for updates, documentation, and revision history.
// See http://www.torjo.com/log2/ for more details
-#define BOOST_LOGGING_COMPILE_FAST_OFF
-#include <boost/logging/logging.hpp>
-#include <boost/logging/format.hpp>
-using namespace boost::logging;
+/**
+ @example mul_levels_one_logger.cpp
+
+ @copydoc mul_levels_one_logger
+
+ @page mul_levels_one_logger mul_levels_one_logger.cpp Example
-/*
- Common usage:
+ This usage:
- You have multiple levels (in this example: debug < info < error)
- You want to format the message before it's written
(in this example: prefix it by index, by time, and append an enter to it)
- - You have several log destinations
- (in this example: the console, the output window, and a file
+ - You have <b>one log</b>, which writes to several log destinations
+ (in this example: the console, the debug output window, and a file)
+
+ In this example, all output will be written to the console, debug window, and "out.txt" file.
+ It will look similar to this one:
+
+ @code
+ 12:59.27 [1] this is so cool 1
+ 12:59.27 [2] hello, world
+ 12:59.27 [3] good to be back ;) 2
+ @endcode
*/
-// Step 1: define your formatter & destination base classes
+
+
+#define BOOST_LOGGING_COMPILE_FAST_OFF
+#include <boost/logging/logging.hpp>
+#include <boost/logging/format.hpp>
+
+using namespace boost::logging;
+
+// Step 1: specify your formatter & destination base classes
typedef formatter::base< std::string& > formatter_base;
typedef destination::base< const std::string & > destination_base;
// Step 2 : define your logging class(es)
typedef logger< use_format_write<formatter_base,destination_base> > log_type;
-// Step 3 : if you use levels, have a log level holder
+// Step 3 : If you use levels, Set up a log level holder
level::holder g_log_level; // holds the application log level
-// Step 4A: declare which loggers you'll use
+// Step 4: declare which loggers you'll use
BOOST_DECLARE_LOG(g_l, log_type) // normally this goes into a header file ;)
-// Step 4B: define which loggers you'll use
+// Step 5: define which loggers you'll use
BOOST_DEFINE_LOG(g_l, log_type)
-// Step 5: define the macros through which you'll log
+// Step 6: define the macros through which you'll log
#define LDBG_ BOOST_LOG_USE_LOG_IF_LEVEL(g_l, g_log_level, debug )
#define LERR_ BOOST_LOG_USE_LOG_IF_LEVEL(g_l, g_log_level, error )
#define LAPP_ BOOST_LOG_USE_LOG_IF_LEVEL(g_l, g_log_level, info )
void test_mul_levels_one_logger() {
- // Step 6: add formatters and destinations
+ // Step 7: add formatters and destinations
// That is, how the message is to be formatted...
g_l->writer().add_formatter( formatter::idx() );
g_l->writer().add_formatter( formatter::time("$hh:$mm.$ss ") );
@@ -62,7 +82,7 @@
g_l->writer().add_destination( destination::dbg_window() );
g_l->writer().add_destination( destination::file("out.txt") );
- // Step 7: use it...
+ // Step 8: use it...
int i = 1;
LDBG_ << "this is so cool " << i++;
@@ -76,16 +96,7 @@
g_log_level.set_enabled(level::info);
LAPP_ << "good to be back ;) " << i++;
- /*
- Step 8 : Enjoy!
-
- The output will be written to the console, debug window, and "out.txt" file.
- It will look similar to this one:
-
- 12:59.27 [1] this is so cool 1
- 12:59.27 [2] hello, world
- 12:59.27 [3] good to be back ;) 2
- */
+ // Step 9 : Enjoy!
}
Modified: sandbox/logging/lib/logging/samples/vc8/loggingvc8/loggingvc8.vcproj
==============================================================================
--- sandbox/logging/lib/logging/samples/vc8/loggingvc8/loggingvc8.vcproj (original)
+++ sandbox/logging/lib/logging/samples/vc8/loggingvc8/loggingvc8.vcproj 2007-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -436,8 +436,20 @@
Name="scenarios"
>
<File
+ RelativePath="..\..\scenarios\mul_levels_mul_logers.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\scenarios\mul_levels_one_logger.cpp"
>
+ <FileConfiguration
+ Name="Test|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
</Filter>
</Filter>
@@ -737,7 +749,7 @@
>
</File>
<File
- RelativePath="..\..\..\..\..\boost\logging\detail\raw_doc\common_usage.hpp"
+ RelativePath="..\..\..\..\..\boost\logging\detail\raw_doc\common_usage_steps_fd.hpp"
>
</File>
<File
@@ -776,6 +788,18 @@
RelativePath="..\..\..\..\..\boost\logging\detail\raw_doc\workflow.hpp"
>
</File>
+ <Filter
+ Name="scenarios"
+ >
+ <File
+ RelativePath="..\..\..\..\..\boost\logging\detail\raw_doc\scenarios.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\boost\logging\detail\raw_doc\scenarios_code.hpp"
+ >
+ </File>
+ </Filter>
</Filter>
</Files>
<Globals>
Modified: sandbox/logging/lib/logging/src/changelog.txt
==============================================================================
--- sandbox/logging/lib/logging/src/changelog.txt (original)
+++ sandbox/logging/lib/logging/src/changelog.txt 2007-10-22 02:08:34 EDT (Mon, 22 Oct 2007)
@@ -1,3 +1,10 @@
+
+
+v0.8.1, 22 oct 2007
+- added one more common scenario
+- finally figured out how I can add examples using doxygen :)
+
+
v0.8, 20 oct 2007
- added use_format_write class
- removed the filter from the logger class (need to update documentation)
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