mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-05 03:02:06 +00:00
Fix cache system not working properly
Clean up codes.
This commit is contained in:
18 files changed
+1661
-1667
No files matched your search
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user