|
Boost-Commit : |
From: john.groups_at_[hidden]
Date: 2008-02-08 12:24:13
Author: jtorjo
Date: 2008-02-08 12:24:12 EST (Fri, 08 Feb 2008)
New Revision: 43178
URL: http://svn.boost.org/trac/boost/changeset/43178
Log:
[logging]
applied patch from Jens Seidel
Text files modified:
sandbox/logging/boost/logging/format/destination/convert_destination.hpp | 11 +++++++----
sandbox/logging/boost/logging/format/destination/rolling_file.hpp | 2 +-
sandbox/logging/boost/logging/format/destination/syslog.hpp | 13 ++++---------
sandbox/logging/boost/logging/writer/on_dedicated_thread.hpp | 2 +-
sandbox/logging/libs/logging/internal/vc8/loggingvc8/loggingvc8.vcproj | 4 ++++
sandbox/logging/libs/logging/samples/compile_time/log.h | 1 -
sandbox/logging/libs/logging/samples/compile_time/main.cpp | 2 +-
sandbox/logging/libs/logging/samples/dll_and_exe/the_exe/the_exe.cpp | 2 +-
sandbox/logging/libs/logging/tests/test_rolling_file/test.cpp | 8 ++++----
sandbox/logging/libs/logging/tests/test_ts_resouce_with_cache/test_ts_resource.cpp | 2 +-
10 files changed, 24 insertions(+), 23 deletions(-)
Modified: sandbox/logging/boost/logging/format/destination/convert_destination.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/destination/convert_destination.hpp (original)
+++ sandbox/logging/boost/logging/format/destination/convert_destination.hpp 2008-02-08 12:24:12 EST (Fri, 08 Feb 2008)
@@ -23,10 +23,8 @@
#include <boost/logging/detail/fwd.hpp>
-namespace boost { namespace logging { namespace destination {
-
-template<class t> struct into {};
-
+namespace boost { namespace logging {
+
namespace tag {
template<
class string_ ,
@@ -41,6 +39,11 @@
class param9 ,
class param10> struct holder ;
}
+
+namespace destination {
+
+template<class t> struct into {};
+
/**
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 2008-02-08 12:24:12 EST (Fri, 08 Feb 2008)
@@ -98,7 +98,7 @@
if ( m_flags.start_where_size_not_exceeded() ) {
for ( m_cur_idx = 0; m_cur_idx < m_flags.file_count(); ++m_cur_idx )
if ( fs::exists( file_name(m_cur_idx) )) {
- if ( fs::file_size( file_name(m_cur_idx)) < m_flags.max_size_bytes() )
+ if ( static_cast<int>(fs::file_size( file_name(m_cur_idx))) < m_flags.max_size_bytes() )
// file hasn't reached max size
break;
}
Modified: sandbox/logging/boost/logging/format/destination/syslog.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/destination/syslog.hpp (original)
+++ sandbox/logging/boost/logging/format/destination/syslog.hpp 2008-02-08 12:24:12 EST (Fri, 08 Feb 2008)
@@ -25,6 +25,7 @@
#include <boost/logging/detail/manipulator.hpp>
#include <boost/logging/format/destination/convert_destination.hpp>
#include <boost/logging/format/destination/file.hpp>
+#include <boost/logging/format/formatter/tags.hpp> // uses_tag
#include <boost/logging/detail/level.hpp>
#include <syslog.h>
@@ -57,10 +58,9 @@
See @ref boost::logging::tag "how to use tags".
*/
-template<class convert = do_convert_format::prepend> struct syslog_t : is_generic, uses_tag< level_t<convert>, ::boost::logging::tag::level >, boost::logging::op_equal::always_equal {
- typedef convert convert_type;
+struct syslog : is_generic, formatter::uses_tag< formatter::level, ::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 {
- syslog( level_to_syslog_level(tag.val) , as_string(str).c_str() );
+ ::syslog( level_to_syslog_level(tag.val) , as_string(str).c_str() );
}
private:
@@ -72,7 +72,7 @@
if ( level <= level::info)
return LOG_INFO;
if ( level <= level::warning)
- return LOG_WARN;
+ return LOG_WARNING;
if ( level <= level::error)
return LOG_ERR;
if ( level <= level::fatal)
@@ -86,11 +86,6 @@
-/** @brief syslog_t with default values. See syslog_t
-
-_at_copydoc syslog_t
-*/
-typedef syslog_t<> syslog;
}}}
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 2008-02-08 12:24:12 EST (Fri, 08 Feb 2008)
@@ -130,7 +130,7 @@
non_const_context_base::context().write_period_ms = period_ms;
}
- ~on_dedicated_thread() {
+ virtual ~on_dedicated_thread() {
boost::shared_ptr<boost::thread> writer;
{ scoped_lock lk( non_const_context_base::context().cs);
non_const_context_base::context().is_working = false;
Modified: sandbox/logging/libs/logging/internal/vc8/loggingvc8/loggingvc8.vcproj
==============================================================================
--- sandbox/logging/libs/logging/internal/vc8/loggingvc8/loggingvc8.vcproj (original)
+++ sandbox/logging/libs/logging/internal/vc8/loggingvc8/loggingvc8.vcproj 2008-02-08 12:24:12 EST (Fri, 08 Feb 2008)
@@ -631,6 +631,10 @@
RelativePath="..\..\..\..\..\boost\logging\format\destination\shared_memory.hpp"
>
</File>
+ <File
+ RelativePath="..\..\..\..\..\boost\logging\format\destination\syslog.hpp"
+ >
+ </File>
</Filter>
</Filter>
<Filter
Modified: sandbox/logging/libs/logging/samples/compile_time/log.h
==============================================================================
--- sandbox/logging/libs/logging/samples/compile_time/log.h (original)
+++ sandbox/logging/libs/logging/samples/compile_time/log.h 2008-02-08 12:24:12 EST (Fri, 08 Feb 2008)
@@ -19,7 +19,6 @@
#ifndef COMPILE_WITHOUT_LOG
#include <boost/logging/format_fwd.hpp>
-#include <boost/logging/tags.hpp>
// Step 1: Optimize : use tags (on top of a cache string, to make formatting the message faster)
namespace bl = boost::logging;
Modified: sandbox/logging/libs/logging/samples/compile_time/main.cpp
==============================================================================
--- sandbox/logging/libs/logging/samples/compile_time/main.cpp (original)
+++ sandbox/logging/libs/logging/samples/compile_time/main.cpp 2008-02-08 12:24:12 EST (Fri, 08 Feb 2008)
@@ -32,7 +32,7 @@
#include <iostream>
-int main(int argc, char * argv[])
+int main()
{
return 0;
}
Modified: sandbox/logging/libs/logging/samples/dll_and_exe/the_exe/the_exe.cpp
==============================================================================
--- sandbox/logging/libs/logging/samples/dll_and_exe/the_exe/the_exe.cpp (original)
+++ sandbox/logging/libs/logging/samples/dll_and_exe/the_exe/the_exe.cpp 2008-02-08 12:24:12 EST (Fri, 08 Feb 2008)
@@ -19,7 +19,7 @@
#include "log.h"
-int main(int argc, char* argv[])
+int main()
{
int i = 0;
L_EXE_ << "beginning of exe log" << ++i;
Modified: sandbox/logging/libs/logging/tests/test_rolling_file/test.cpp
==============================================================================
--- sandbox/logging/libs/logging/tests/test_rolling_file/test.cpp (original)
+++ sandbox/logging/libs/logging/tests/test_rolling_file/test.cpp 2008-02-08 12:24:12 EST (Fri, 08 Feb 2008)
@@ -148,9 +148,9 @@
while ( std::getline(in, line, NEXT_LINE) ) {
g_blocks[cur_block] += line + NEXT_LINE;
- if ( g_blocks[cur_block].size() > MAX_SIZE_PER_FILE) {
+ if ( g_blocks[cur_block].size() > static_cast<unsigned int>(MAX_SIZE_PER_FILE)) {
cur_block = (cur_block + 1) % FILE_COUNT;
- if ( g_blocks[cur_block].size() > MAX_SIZE_PER_FILE)
+ if ( g_blocks[cur_block].size() > static_cast<unsigned int>(MAX_SIZE_PER_FILE))
// we've rolled to a new file - clear it first
g_blocks[cur_block].clear();
}
@@ -222,9 +222,9 @@
while ( std::getline(in, line, NEXT_LINE) ) {
g_blocks[cur_block] += line + NEXT_LINE;
- if ( g_blocks[cur_block].size() > MAX_SIZE_PER_FILE) {
+ if ( g_blocks[cur_block].size() > static_cast<unsigned int>(MAX_SIZE_PER_FILE)) {
cur_block = (cur_block + 1) % FILE_COUNT;
- if ( g_blocks[cur_block].size() > MAX_SIZE_PER_FILE)
+ if ( g_blocks[cur_block].size() > static_cast<unsigned int>(MAX_SIZE_PER_FILE))
// we've rolled to a new file - clear it first
g_blocks[cur_block].clear();
}
Modified: sandbox/logging/libs/logging/tests/test_ts_resouce_with_cache/test_ts_resource.cpp
==============================================================================
--- sandbox/logging/libs/logging/tests/test_ts_resouce_with_cache/test_ts_resource.cpp (original)
+++ sandbox/logging/libs/logging/tests/test_ts_resouce_with_cache/test_ts_resource.cpp 2008-02-08 12:24:12 EST (Fri, 08 Feb 2008)
@@ -166,7 +166,7 @@
}
-void test_resource(int idx) {
+void test_resource(int /* idx */) {
array cur_val ;
{
resource::read res(g_resource);
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