easlyloggin added to MysqlPing.cpp

pull/111/head
moneroexamples 6 years ago
parent a967324142
commit f25558456f

@ -2,6 +2,9 @@
// Created by mwo on 12/07/18.
//
#include "easylogging++.h"
#include "om_log.h"
#include "MysqlPing.h"
@ -25,16 +28,16 @@ MysqlPing::operator()()
{
if (!c->ping())
{
cerr << "Pinging mysql failed. Stoping mysql pinging thread. \n";
OMERROR << "Pinging mysql failed. Stoping mysql pinging thread.";
why_stoped = StopReason::PingFailed;
break;
}
cout << "Mysql ping successful. \n" ;
OMINFO << "Mysql ping successful." ;
}
else
{
cerr << "std::weak_ptr<MySqlConnector> conn expired! \n";
OMERROR << "std::weak_ptr<MySqlConnector> conn expired!";
why_stoped = StopReason::PointerExpired;
break;
}

@ -20,7 +20,7 @@ public:
enum class StopReason {NotYetStopped, PingFailed, PointerExpired};
MysqlPing(std::shared_ptr<MySqlConnector> _conn, uint64_t _ping_time = 3600);
MysqlPing(std::shared_ptr<MySqlConnector> _conn, uint64_t _ping_time = 600);
void operator()();
void stop() {keep_looping = false;}

Loading…
Cancel
Save