Skip to content

Commit

Permalink
🩹 fix: change log module to glog
Browse files Browse the repository at this point in the history
  • Loading branch information
maro5397 committed Dec 15, 2021
1 parent 958b15d commit 05b2a6d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/captiveportal/captiveportal.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include(../../cp.pri)

DESTDIR = $${PWD}/../../bin

LIBS += -L../../../opensocket/lib -lopensocket -lssl -lcrypto -lpthread -lnetfilter_queue
LIBS += -L../../../opensocket/lib -lopensocket -lssl -lcrypto -lpthread -lnetfilter_queue -lglog

SOURCES += \
../../src/httprequest.cpp \
Expand Down
6 changes: 3 additions & 3 deletions app/captiveportal/wesslserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ void WESslServer::handleClnt(SslClientSocket* clntsock) {
int len = 0;
while((len = clntsock->recv(buffer, BUFSIZE)) != -1) {
if(len == 0) {
spdlog::info("clntsock is shutdown");
DLOG(INFO) << "clntsock is shutdown";
return;
}
spdlog::info("recv data from client");
DLOG(INFO) << "recv data from client";
if(strncmp(buffer, "GET ", 4) == 0)
{
spdlog::info("send redirect data to client");
DLOG(INFO) << "send redirect data to client";
clntsock->send(message.data(), message.length() + 1);
}
}
Expand Down
6 changes: 3 additions & 3 deletions app/captiveportal/weuiserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void WEUIServer::handleClnt(TcpClientSocket *clntsock) {

while((len = clntsock->recv(buffer, BUFSIZE)) != -1) {
if(len == 0) {
spdlog::info("clntsock is shutdown");
DLOG(INFO) << "clntsock is shutdown";
return;
}
uirequest_.resetData();
Expand All @@ -32,7 +32,7 @@ void WEUIServer::setHttpResponse() {
std::string path = uirequest_.getURL();
uiresponse_.resetData();
int size = 0;
spdlog::info("request path: {}", path);
DLOG(INFO) << "request path:" << path;

if(path == "/") {
size = getWebUIData("/index.html");
Expand Down Expand Up @@ -75,7 +75,7 @@ void WEUIServer::setHttpResponse() {
}

int WEUIServer::getWebUIData(std::string path) {
spdlog::info("Get local data from\n{}", rootdir_+path);
DLOG(INFO) << "Get local data from" << path;
std::ifstream fin(rootdir_+path);
int size = 0;

Expand Down

0 comments on commit 05b2a6d

Please sign in to comment.