Added some debug text to check stats coming through.

This commit is contained in:
Thulinma 2011-12-04 20:52:37 +01:00
parent 49cae23086
commit 62cd774288
2 changed files with 2 additions and 0 deletions

View file

@ -255,6 +255,7 @@ namespace Buffer{
}
if (StatsSocket.connected()){
StatsSocket.write(Storage.toStyledString());
std::cout << "Wrote stats to controller!" << std::endl;
Storage["log"].clear();
}
}

View file

@ -450,6 +450,7 @@ int main(int argc, char ** argv){
if (it->Received() != ""){
size_t newlines = it->Received().find("\n\n");
while (newlines != std::string::npos){
Log("STAT", "Received stats from a buffer");
if (!JsonParse.parse(it->Received().substr(0, newlines), Request, false)){
if (Request.isMember("totals") && Request["totals"].isMember("buffer")){
std::string thisbuffer = Request["totals"]["buffer"].asString();