Put modules in ripple namespace

This commit is contained in:
Vinnie Falco
2013-06-27 13:41:20 -07:00
parent 8588587b71
commit 638656a597
35 changed files with 198 additions and 234 deletions

View File

@@ -12,7 +12,6 @@ namespace websocketpp
namespace log
{
#if RIPPLE_USE_NAMESPACE
using namespace ripple;
LogPartition websocketPartition ("WebSocket");
@@ -48,37 +47,6 @@ void websocketLog (websocketpp::log::elevel::value v, const std::string& entry)
if (websocketPartition.doLog (s))
Log (s, websocketPartition) << entry;
}
#else
LogPartition websocketPartition ("WebSocket");
void websocketLog (websocketpp::log::alevel::value v, const std::string& entry)
{
if ((v == websocketpp::log::alevel::DEVEL) || (v == websocketpp::log::alevel::DEBUG_CLOSE))
{
if (websocketPartition.doLog (lsTRACE))
Log (lsDEBUG, websocketPartition) << entry;
}
else if (websocketPartition.doLog (lsDEBUG))
Log (lsDEBUG, websocketPartition) << entry;
}
void websocketLog (websocketpp::log::elevel::value v, const std::string& entry)
{
LogSeverity s = lsDEBUG;
if ((v & websocketpp::log::elevel::INFO) != 0)
s = lsINFO;
else if ((v & websocketpp::log::elevel::FATAL) != 0)
s = lsFATAL;
else if ((v & websocketpp::log::elevel::RERROR) != 0)
s = lsERROR;
else if ((v & websocketpp::log::elevel::WARN) != 0)
s = lsWARNING;
if (websocketPartition.doLog (s))
Log (s, websocketPartition) << entry;
}
#endif
}
}