>From jensseidel@users.sf.net Wed Oct 17 13:30:38 2007 Date: Wed, 17 Oct 2007 13:30:38 +0200 From: Jens Seidel To: john.code@torjo.com Bcc: Jens Seidel Subject: Comments to Boost.Log2 Message-ID: <20071017113038.GA31530@imkf-pc073.imkf.tu-freiberg.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline Error-To: Jens Seidel User-Agent: Mutt/1.5.13 (2006-08-11) Status: RO Content-Length: 6333 Lines: 149 --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi John, I was very surprised to read today on your homepage that you continue working on Boost.log. Great! I suggest you announce it on the boost-user list. On this list I recently posted a few comments for you, as I failed in the past to contact you (and considered the project death). See http://lists.boost.org/boost-users/2007/09/30970.php OK, a few further comments to your new version 2: * The zip archive contains object files. Please remove these. * Are you aware that the licenses of e.g. lib/logging/tests/template.cpp and boost/logging/defaults.hpp are different? Is this wanted? * Some code contains: "See accompanying file LICENSE_1_0.txt". I miss this file in your archive. * "generating the docs.txt" Please avoid using spaces in names. You are probably aware that a few filesystems are not able to store such files (e.g. ISO 9660 without Rock Ridge or Joliet extensions). It makes writing shell scripts also harder as a space is a word separator in most shells (e.g. bash) (for file in *; do ...). * I attached a patch which allows your test code to be compiled by fixing errors and warnings. A single warning remains which I marked in the code in a comment. I added a Makefile to simplify the task of compiling. Read it to see the compiler flags I used. Used compiler: $ /usr/lib/gcc-snapshot/bin/g++ --version g++ (Debian 20070916-1) 4.3.0 20070916 (experimental) [trunk revision 128522] Have fun, Jens --jI8keyz6grp/JLjh Content-Type: text/x-patch; charset=base64 Content-Disposition: attachment; filename="boost.log2.diff" diff -Nur /tmp/logging/logging/boost/logging/detail/fwd.hpp ./boost/logging/detail/fwd.hpp --- /tmp/logging/logging/boost/logging/detail/fwd.hpp 2007-10-13 18:17:56.000000000 +0200 +++ ./boost/logging/detail/fwd.hpp 2007-10-17 11:28:14.000000000 +0200 @@ -47,7 +47,7 @@ typedef types::filter_type filter_type; typedef types::mutex mutex; - namespace writer {}; + namespace writer {} diff -Nur /tmp/logging/logging/boost/logging/detail/util.hpp ./boost/logging/detail/util.hpp --- /tmp/logging/logging/boost/logging/detail/util.hpp 2007-10-11 19:44:44.000000000 +0200 +++ ./boost/logging/detail/util.hpp 2007-10-17 11:28:06.000000000 +0200 @@ -37,7 +37,7 @@ // FIXME I need to figure out how to do this - probably by just holding char[sizeof(T) * 2] or so - align it and that's it and have an extra bool ensure_created_before_used(const type & val = type() ) : val(val) {} type & operator()() { return *this; } - const type & operator()() { return *this; } + const type & operator()() const { return *this; } private: type val; }; diff -Nur /tmp/logging/logging/boost/logging/filter.hpp ./boost/logging/filter.hpp --- /tmp/logging/logging/boost/logging/filter.hpp 2007-10-15 11:17:56.000000000 +0200 +++ ./boost/logging/filter.hpp 2007-10-17 12:49:31.000000000 +0200 @@ -203,6 +203,7 @@ @endcode */ struct init_both_t {}; + // warning: 'boost::logging::::init_both' defined but not used namespace { init_both_t init_both; } /** @@ -265,7 +266,7 @@ /** */ - template logger(const init_both_t&, p1 a1, p2 a2) : process_base(a1), filter(a2) {} + template logger(const init_both_t&, p1 a1, p2 a2) : filter(a2), process_base(a1) {} BOOST_LOGGING_FORWARD_CONSTRUCTOR(logger, process_base) diff -Nur /tmp/logging/logging/boost/logging/ts/ts_resource.hpp ./boost/logging/ts/ts_resource.hpp --- /tmp/logging/logging/boost/logging/ts/ts_resource.hpp 2007-10-11 19:42:56.000000000 +0200 +++ ./boost/logging/ts/ts_resource.hpp 2007-10-17 11:28:46.000000000 +0200 @@ -114,7 +114,7 @@ typedef tls_resource_with_cache self_type; - tls_resource_with_cache(const type& val , int cache_millis ) : m_val(val) {} + tls_resource_with_cache(const type& val , int /*cache_millis*/) : m_val(val) {} public: diff -Nur /tmp/logging/logging/lib/logging/tests/Makefile ./lib/logging/tests/Makefile --- /tmp/logging/logging/lib/logging/tests/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ ./lib/logging/tests/Makefile 2007-10-17 12:47:32.000000000 +0200 @@ -0,0 +1,10 @@ +SOURCES=template.cpp test_mul_lev_difflogs.cpp test_mul_lev_samelog.cpp test_multiple_simple_logs.cpp test_ostream_like.cpp test_simple_dump_to_cout.cpp +BINARIES=template test_mul_lev_difflogs test_mul_lev_samelog test_multiple_simple_logs test_ostream_like test_simple_dump_to_cout + +all: $(BINARIES) + +clean: + rm -f $(BINARIES) + +%: %.cpp + /usr/lib/gcc-snapshot/bin/g++ -DSINGLE_TEST -I ../../../ -Wall -pedantic -Wno-uninitialized -Wcast-align -Wpointer-arith -Wextra $< -o $@ diff -Nur /tmp/logging/logging/lib/logging/tests/test_multiple_simple_logs.cpp ./lib/logging/tests/test_multiple_simple_logs.cpp --- /tmp/logging/logging/lib/logging/tests/test_multiple_simple_logs.cpp 2007-10-11 19:46:06.000000000 +0200 +++ ./lib/logging/tests/test_multiple_simple_logs.cpp 2007-10-17 12:47:52.000000000 +0200 @@ -42,7 +42,11 @@ }; struct write_to_dbg { - void operator()(const std::string & msg) const { + void operator()(const std::string & +#ifdef BOOST_WINDOWS + msg +#endif + ) const { #ifdef BOOST_WINDOWS ::OutputDebugStringA( (msg + "\n").c_str() ); #endif diff -Nur /tmp/logging/logging/lib/logging/tests/test_simple_dump_to_cout.cpp ./lib/logging/tests/test_simple_dump_to_cout.cpp --- /tmp/logging/logging/lib/logging/tests/test_simple_dump_to_cout.cpp 2007-10-11 19:46:06.000000000 +0200 +++ ./lib/logging/tests/test_simple_dump_to_cout.cpp 2007-10-17 12:47:56.000000000 +0200 @@ -53,14 +53,13 @@ int idx = 0; for ( ; in >> word; ++idx) - if ( idx < allow_word_count ) + if ( idx < allow_word_count ) { L_("reading word " + word); - else if ( idx == allow_word_count ) + } else if ( idx == allow_word_count ) // disable the log g_single_log.set_enabled(false); } - #ifdef SINGLE_TEST int main() { --jI8keyz6grp/JLjh--