From: g0dil Date: Mon, 10 Nov 2008 15:08:08 +0000 (+0000) Subject: Utils/Logger: Target examples\nPackets: Relax annotation type restrictions X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=6a0836b7f462d3d77b79b35638cdbf4c9d4202fc;p=senf.git Utils/Logger: Target examples\nPackets: Relax annotation type restrictions git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@952 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/PacketImpl.hh b/Packets/PacketImpl.hh index ea76bd6..667eebb 100644 --- a/Packets/PacketImpl.hh +++ b/Packets/PacketImpl.hh @@ -31,7 +31,8 @@ #include #include #include -#include +#include +#include #include #include "../Utils/pool_alloc_mixin.hh" #include "PacketTypes.hh" @@ -98,7 +99,9 @@ namespace detail { # ifdef BOOST_HAS_TYPE_TRAITS_INTRINSICS - BOOST_STATIC_ASSERT(( boost::is_pod::value || Complex )); + BOOST_STATIC_ASSERT(( (boost::has_trivial_constructor::value + && boost::has_trivial_destructor::value) + || Complex )); # endif }; diff --git a/Utils/Logger/FileTarget.hh b/Utils/Logger/FileTarget.hh index cd5c71a..45f11fd 100644 --- a/Utils/Logger/FileTarget.hh +++ b/Utils/Logger/FileTarget.hh @@ -42,6 +42,13 @@ namespace log { The FileTarget will save all %log messages in the given file. Messages will be appended at the end of the file. + \code + senf::log::FileTarget target ("file.name"); + + // Route all messages to this file. + target.route(); + \endcode + After %log files have been rotated, the reopen() member should be called to create a new %log file. diff --git a/Utils/Logger/SyslogTarget.hh b/Utils/Logger/SyslogTarget.hh index 3de11ec..18a1559 100644 --- a/Utils/Logger/SyslogTarget.hh +++ b/Utils/Logger/SyslogTarget.hh @@ -40,6 +40,13 @@ namespace log { The SyslogTarget will send all log messages to the syslog at the given facility. + \code + senf::log::SyslogTarget syslog; + + // Route all messages to the syslog + syslog.route(); + \endcode + Valid facility values (taken from man 3 syslog): \par "" LOG_AUTHPRIV, LOG_CRON, LOG_DAEMON, LOG_FTP,