//#include "Target.mpp"
#define prefix_
-///////////////////////////////cc.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::log::Target
namespace senf {
prefix_ senf::log::Target::Target(std::string const & name)
{
- namespace kw = senf::console::kw;
- namespace fty = senf::console::factory;
+ namespace kw = console::kw;
+ namespace fty = console::factory;
detail::TargetRegistry::instance().registerTarget(this, name);
consoleDir_()
.add("route", fty::Command(&Target::consoleRoute, this)
.arg("index", "index at which to insert new rule")
.arg("parameters", "log parameters. The log parameters select the log stream, log area\n"
- " and log level. You may specify any combination of these parameterse\n"
+ " and log level. You may specify any combination of these parameters\n"
" in any order. Use the '/sys/log/stream' and '/sys/log/areas' commands\n"
" to list all valid streams and areas. Valid log levels are:\n"
" VERBOSE NOTICE MESSAGE IMPORTANT CRITICAL FATAL")
updateRoutingCache(i->stream_, i->area_);
}
-////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// protected members
prefix_ senf::console::ScopedDirectory<> & senf::log::Target::consoleDir()
return consoleDir_();
}
-////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// private members
prefix_ void senf::log::Target::route(detail::StreamBase const * stream,
unsigned limit (DISABLED::value);
RIB::iterator i (rib_.begin());
RIB::iterator const i_end (rib_.end());
- for(; i != i_end; ++i)
+ for (; i != i_end; ++i)
if ( (! i->stream_ || i->stream_ == stream) &&
(! i->area_ || i->area_ == area) &&
i->action_ == ACCEPT ) {
unroute(pm.stream, pm.area, pm.level, action);
}
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::log::detail::TargetRegistry
prefix_ void senf::log::detail::TargetRegistry::dynamicTarget(std::auto_ptr<Target> target)
{
- namespace fty = senf::console::factory;
+ namespace fty = console::factory;
target->consoleDir()
.add("remove", fty::Command<void ()>(
prefix_ senf::log::detail::TargetRegistry::TargetRegistry()
: fallbackRouting_(true)
{
- namespace kw = senf::console::kw;
- namespace fty = senf::console::factory;
+ namespace kw = console::kw;
+ namespace fty = console::factory;
console::sysdir().add("log", consoleDir_());
consoleDir_()
consoleDir_()
.add("message", fty::Command(&TargetRegistry::consoleWrite, this)
.arg("parameters", "log parameters. The log parameters select the log stream, log area\n"
- " and log level. You may specify any combination of these parameterse\n"
+ " and log level. You may specify any combination of these parameters\n"
" in any order. Use the '/sys/log/stream' and '/sys/log/areas' commands\n"
" to list all valid streams and areas. Valid log levels are:\n"
" VERBOSE NOTICE MESSAGE IMPORTANT CRITICAL FATAL",
return senf::console::Client::get(os).consoleDir().node().thisptr();
}
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::log::detail::LogParameters
prefix_ void senf::log::detail::LogParameters::clear()
level = MESSAGE::value;
}
-prefix_ senf::log::detail::LogParameters::LogParameters
-senf::log::detail::LogParameters::defaultParameters()
+prefix_ senf::log::detail::LogParameters senf::log::detail::LogParameters::defaultParameters()
{
LogParameters pm;
pm.clear();
return pm;
}
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// namespace members
prefix_ std::ostream & senf::log::operator<<(std::ostream & os, senf::log::Target::action_t const & action)
parseParamToken(i->value(), out);
}
-//////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// I need to put this here, otherwise the file target will not be registered
// if it is not used ... :-(
senf::log::SyslogTarget::RegisterConsole senf::log::SyslogTarget::RegisterConsole::instance;
senf::log::SyslogUDPTarget::RegisterConsole senf::log::SyslogUDPTarget::RegisterConsole::instance;
-///////////////////////////////cc.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#undef prefix_
//#include "Target.mpp"