mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-14 14:08:19 +08:00
up
This commit is contained in:
@@ -40,7 +40,7 @@ char* GetLogRecord()
|
||||
return log_record_str;
|
||||
}
|
||||
|
||||
void web_log(const char *N, const char *M, ...)
|
||||
void WebLog(const char *M, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, M);
|
||||
@@ -48,10 +48,9 @@ void web_log(const char *N, const char *M, ...)
|
||||
va_end(ap);
|
||||
|
||||
LOG_TMP = (char*)malloc(sizeof(char)*LOG_LEN);
|
||||
now = time(NULL);
|
||||
now += 28800;
|
||||
now = time(NULL) + 28800; //<2F><>8<EFBFBD><38>
|
||||
strftime(time_buf, TIM_LEN, "%Y-%m-%d %H:%M:%S", localtime(&now));
|
||||
snprintf(LOG_TMP, LOG_LEN, "[%s][%s %s:%d] %s", time_buf, N, SHORT_FILE, __LINE__, log);
|
||||
snprintf(LOG_TMP, LOG_LEN, "[%s]%s", time_buf, log);
|
||||
SetLogRecord(&log_record, LOG_TMP);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ extern char time_buf[];
|
||||
|
||||
void SetLogRecord(LogRecord* lr, char* log);
|
||||
char* GetLogRecord();
|
||||
void web_log(const char *N, const char *M, ...);
|
||||
void WebLog(const char *M, ...);
|
||||
|
||||
#define web_log0(N, M, ...) \
|
||||
LOG_TMP = (char*)malloc(sizeof(char)*LOG_LEN); \
|
||||
@@ -30,4 +30,6 @@ void web_log(const char *N, const char *M, ...);
|
||||
snprintf(LOG_TMP, LOG_LEN, "[%s][%s %s:%d] "M, time_buf, N, SHORT_FILE, __LINE__, ##__VA_ARGS__); \
|
||||
SetLogRecord(&log_record, LOG_TMP); \
|
||||
|
||||
#define web_log(N, M, ...) WebLog("["N" %s:%d] "M, SHORT_FILE, __LINE__, ##__VA_ARGS__)
|
||||
|
||||
#endif // !WEB_LOG_H
|
||||
|
||||
Reference in New Issue
Block a user