Cosmetic improvement.

This commit is contained in:
JoelKatz
2012-12-05 13:21:14 -08:00
parent a43a993a01
commit 20b96613e4

View File

@@ -1575,15 +1575,16 @@ Json::Value RPCHandler::doLogLevel(Json::Value jvRequest)
// log_level
if (!jvRequest.isMember("severity"))
{ // get log severities
Json::Value ret = Json::objectValue;
ret["base"] = Log::severityToString(Log::getMinSeverity());
Json::Value ret(Json::objectValue);
Json::Value lev(Json::objectValue);
lev["base"] = Log::severityToString(Log::getMinSeverity());
std::vector< std::pair<std::string, std::string> > logTable = LogPartition::getSeverities();
typedef std::pair<std::string, std::string> stringPair;
BOOST_FOREACH(const stringPair& it, logTable)
ret[it.first] = it.second;
lev[it.first] = it.second;
ret["levels"] = lev;
return ret;
}