Add console logger to replace original debug output.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "boost/algorithm/string.hpp"
|
||||
#include "json/json.h" // jsoncpp
|
||||
|
||||
#include "webcc/logger.h"
|
||||
#include "webcc/http_client.h"
|
||||
#include "webcc/http_request.h"
|
||||
#include "webcc/http_response.h"
|
||||
@@ -54,7 +55,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
std::cout << http_response.content() << std::endl;
|
||||
std::cout << "result:\n" << http_response.content() << std::endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -174,6 +175,8 @@ int main(int argc, char* argv[]) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
LOG_INIT(webcc::VERB, 0);
|
||||
|
||||
g_host = argv[1];
|
||||
g_port = argv[2];
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "webcc/logger.h"
|
||||
#include "webcc/rest_server.h"
|
||||
|
||||
#include "book_services.h"
|
||||
|
||||
static void Help(const char* argv0) {
|
||||
@@ -14,6 +17,8 @@ int main(int argc, char* argv[]) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
LOG_INIT(webcc::VERB, 0);
|
||||
|
||||
unsigned short port = std::atoi(argv[1]);
|
||||
|
||||
std::size_t workers = 2;
|
||||
|
||||
Reference in New Issue
Block a user