Fix cache system not working properly

Clean up codes.
This commit is contained in:
Tindy X committed 2021-10-10 21:32:54 +08:00
1 parent b972dfaa56
commit b4201b24f7
18 files changed
+1661 -1667

No files matched your search

+2 -4
View File
@@ -5,11 +5,9 @@
#include <sys/types.h>
#include <unistd.h>
#include "../handler/settings.h"
#include "logger.h"
extern bool gPrintDbgInfo;
int gLogLevel = LOG_LEVEL_INFO;
std::string getTime(int type)
{
time_t lt;
@@ -38,7 +36,7 @@ std::string getTime(int type)
void writeLog(int type, const std::string &content, int level)
{
if(level > gLogLevel)
if(level > global.logLevel)
return;
const char *levels[] = {"[FATL]", "[ERRO]", "[WARN]", "[INFO]", "[DEBG]", "[VERB]"};
std::cerr<<getTime(2)<<" ["<<getpid()<<" "<<std::this_thread::get_id()<<"]"<<levels[level % 6];