diff --git a/src/MysqlPing.cpp b/src/MysqlPing.cpp index 5710bb6..414a18d 100755 --- a/src/MysqlPing.cpp +++ b/src/MysqlPing.cpp @@ -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 conn expired! \n"; + OMERROR << "std::weak_ptr conn expired!"; why_stoped = StopReason::PointerExpired; break; } diff --git a/src/MysqlPing.h b/src/MysqlPing.h index a913861..9544f72 100755 --- a/src/MysqlPing.h +++ b/src/MysqlPing.h @@ -20,7 +20,7 @@ public: enum class StopReason {NotYetStopped, PingFailed, PointerExpired}; - MysqlPing(std::shared_ptr _conn, uint64_t _ping_time = 3600); + MysqlPing(std::shared_ptr _conn, uint64_t _ping_time = 600); void operator()(); void stop() {keep_looping = false;}