Add file log support

This commit is contained in:
Adam Gu
2018-07-03 14:01:47 +08:00
parent 44271eb2cc
commit 7280b09f10
10 changed files with 96 additions and 40 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ void Test(boost::asio::io_context& ioc) {
}
int main() {
LOG_INIT(0);
LOG_INIT("", webcc::LOG_CONSOLE);
boost::asio::io_context ioc;
+1 -1
View File
@@ -28,7 +28,7 @@ void Test() {
}
int main() {
LOG_INIT(0);
LOG_INIT("", webcc::LOG_CONSOLE);
Test();
Test();
+1 -1
View File
@@ -101,7 +101,7 @@ int main(int argc, char* argv[]) {
return 1;
}
LOG_INIT(0);
LOG_INIT("", webcc::LOG_CONSOLE);
std::string host = argv[1];
std::string port = argv[2];
+1 -1
View File
@@ -160,7 +160,7 @@ int main(int argc, char* argv[]) {
return 1;
}
LOG_INIT(0);
LOG_INIT("", webcc::LOG_CONSOLE);
std::string host = argv[1];
std::string port = argv[2];
+1 -1
View File
@@ -21,7 +21,7 @@ int main(int argc, char* argv[]) {
return 1;
}
LOG_INIT(0);
LOG_INIT("", webcc::LOG_FILE | webcc::LOG_CONSOLE | webcc::LOG_OVERWRITE);
unsigned short port = std::atoi(argv[1]);
+3 -1
View File
@@ -1,9 +1,11 @@
#include <iostream>
#include "webcc/logger.h"
#include "calc_client.h"
int main() {
LOG_INIT(0);
LOG_INIT("", webcc::LOG_CONSOLE);
CalcClient calc;
+1 -1
View File
@@ -17,7 +17,7 @@ int main(int argc, char* argv[]) {
return 1;
}
LOG_INIT(0);
LOG_INIT("", webcc::LOG_CONSOLE);
unsigned short port = std::atoi(argv[1]);