修复仅支持东八区时间的问题,使用localtime_r进行转换

This commit is contained in:
yangwei
2018-12-05 21:04:42 +06:00
committed by dump2file
parent f47f6d8bbf
commit 6c8af75e99
6 changed files with 20 additions and 15 deletions

View File

@@ -6,8 +6,9 @@ CC=gcc
CFLAGS= -g3 -Wall -fPIC -O -Werror
CFLAGS+=-I../inc/
LIB=-L../lib/
LIB+=-lMESA_handle_logger -lpthread
#LIB=-L../lib/
LIB=../lib/libMESA_handle_logger.a
LIB+=-lpthread
LIB_FILE=$(wildcard ../lib/*.a)
@@ -17,7 +18,7 @@ TARGET=test_handle_logger
all:$(TARGET)
$(TARGET):$(SRC) $(LIB_FILE)
$(CC) $(CFLAGS) $(INC) $(LIBPATH) $< -static $(LIB) -o $@
$(CC) $(CFLAGS) $(INC) $(LIBPATH) $< $(LIB) -o $@
clean :
rm -f $(TARGET)

View File

@@ -51,7 +51,7 @@ int main()
pthread_t t[THREAD_NUM];
int i = 0;
sample_handle = MESA_create_runtime_log_handle("./log/", RLOG_LV_DEBUG);
sample_handle = MESA_create_runtime_log_handle("./log/test_log", RLOG_LV_DEBUG);
if(sample_handle == NULL)
{
printf("get log sample_handle error\n");