{
INet6SocketAddress addr;
+ BOOST_CHECK( ! addr );
BOOST_CHECK_EQUAL( boost::lexical_cast<std::string>(addr.address()), "::" );
BOOST_CHECK_EQUAL( addr.port(), 0u );
BOOST_CHECK_EQUAL( addr.iface(), "" );
///////////////////////////////////////////////////////////////////////////
// senf::log::IOStreamTarget
+const char * const senf::log::IOStreamTarget::LEVELNAMES_[8] = {
+ "NONE", "VERBOSE", "NOTICE", "MESSAGE", "IMPORTANT", "CRITICAL", "FATAL", "DISABLED" };
+
prefix_ senf::log::IOStreamTarget::IOStreamTarget(std::ostream & os)
: stream_(os)
{
for (; i != i_end; ++i) {
stream_ << timestamp << sep;
if (area != "senf::log::DefaultArea")
- stream_ << "[" << area << "] ";
+ stream_ << "[" << area << "]";
+ stream_ << "[" << LEVELNAMES_[level] << "] ";
stream_ << *i << "\n";
sep = '-';
}
std::string const & message);
std::ostream & stream_;
+ static char const * const LEVELNAMES_[8];
};
-
}}
///////////////////////////////hh.e////////////////////////////////////////
<dl><dt>VERBOSE</dt><dd>Really verbose %log messages. Messages at this level are used for
internal debugging. They should be enabled only selectively within the areas currently under
- inspection. The default log stream senf::log::Debug has these messages <em>disabled</em> at
+ inspection. The default %log stream senf::log::Debug has these messages <em>disabled</em> at
compile time by default. To enable them, see \ref config.</dd>
<dt>NOTICE</dt><dd>Arbitrary unimportant notice. Message which normally should be disabled
typedef std::string result_type;
std::string operator()(senf::log::Target::RoutingEntry const & entry) const
{
- static char const * levels[] = { "NONE", "VERBOSE", "NOTICE", "MESSAGE",
- "IMPORTANT", "CRITICAL","DISABLED" };
+ static char const * levels[] = {
+ "NONE", "VERBOSE", "NOTICE", "MESSAGE", "IMPORTANT", "CRITICAL", "FATAL", "DISABLED" };
static char const * actions[] = { "ACCEPT", "REJECT" };
std::stringstream s;
s << entry.stream() << "-" << entry.area() << "-" << levels[entry.level()] << "-"