Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a1b02c0

Browse files
committedApr 15, 2024
using VTR_LOG instead of std::cout in gateio
1 parent 4d1e882 commit a1b02c0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎vpr/src/server/gateio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void GateIO::start(int portNum)
2727
{
2828
if (!m_isRunning.load()) {
2929
m_portNum = portNum;
30-
std::cout << "starting server" << std::endl;
30+
VTR_LOG("starting server");
3131
m_isRunning.store(true);
3232
m_thread = std::thread(&GateIO::startListening, this);
3333
}

‎vpr/src/server/gateio.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#include "task.h"
77

8+
#include "vtr_log.h"
9+
810
#include <chrono>
911
#include <sstream>
1012
#include <iostream>
@@ -105,7 +107,7 @@ class GateIO
105107
void flush() {
106108
std::unique_lock<std::mutex> lock(m_logStreamMutex);
107109
if (!m_logStream.str().empty()) {
108-
std::cout << m_logStream.str();
110+
VTR_LOG(m_logStream.str().c_str());
109111
m_logStream.str("");
110112
}
111113
}

0 commit comments

Comments
 (0)
Please sign in to comment.