Skip to content

Commit

Permalink
🪲 update && fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qinguoyi committed May 17, 2020
1 parent 3fbc14d commit a4aa1dc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
3 changes: 1 addition & 2 deletions log/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Log

static void *flush_log_thread(void *args)
{
return Log::get_instance()->async_write_log();
Log::get_instance()->async_write_log();
}
//可选择的参数有日志文件、日志缓冲区大小、最大行数以及最长日志条队列
bool init(const char *file_name, int close_log, int log_buf_size = 8192, int split_lines = 5000000, int max_queue_size = 0);
Expand All @@ -44,7 +44,6 @@ class Log
fputs(single_log.c_str(), m_fp);
m_mutex.unlock();
}
return nullptr;
}

private:
Expand Down
16 changes: 3 additions & 13 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
CXX ?= g++
CXXFLAGS = -Wall -Werror -Wextra

DEBUG ?= 1
ifeq (DEBUG, 1)
CFLAGS += -g -Ddebug
else
CFLAGS += -O2
endif

server: main.cpp ./timer/lst_timer.cpp ./http/http_conn.cpp ./log/log.cpp ./CGImysql/sql_connection_pool.cpp webserver.cpp config.cpp
$(CXX) -lmysqlclient -lpthread $^ $(CXXFLAGS) -o server
server: main.cpp ./timer/lst_timer.cpp ./http/http_conn.cpp ./log/log.cpp ./CGImysql/sql_connection_pool.cpp webserver.cpp config.cpp
g++ -o server main.cpp ./timer/lst_timer.cpp ./http/http_conn.cpp ./log/log.cpp ./CGImysql/sql_connection_pool.cpp webserver.cpp config.cpp -lpthread -lmysqlclient

CGISQL.cgi:./CGImysql/sign.cpp
$(CXX) -o ./root/CGISQL.cgi ./CGImysql/sign.cpp -lmysqlclient -lpthread
g++ -o ./root/CGISQL.cgi ./CGImysql/sign.cpp -lmysqlclient -lpthread

clean:
rm -r server
Expand Down
Binary file removed root/CGISQL.cgi
Binary file not shown.

0 comments on commit a4aa1dc

Please sign in to comment.