From 26927f7146adcf0170edf213cc77ad7368f5c076 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期五, 27 十一月 2020 14:32:17 +0800
Subject: [PATCH] update

---
 include/usgcommon/logger.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/usgcommon/logger.h b/include/usgcommon/logger.h
index 52859ce..cf0d2ba 100644
--- a/include/usgcommon/logger.h
+++ b/include/usgcommon/logger.h
@@ -17,12 +17,12 @@
   FILE *logFile;
 
   void dolog(const char *fmt, va_list ap, int level, int err = 0) {
-    char buf[MAXBUF];
+    char buf[MAXLINE];
 
     struct timeval tv;
     struct tm *info;
     gettimeofday(&tv, NULL);
-    info = localtime(&(tv.tv_sec));
+    info = localtime(&tv.tv_sec);
     strftime(buf, MAXBUF - 1, "%Y-%d-%m %H:%M:%S", info);
     snprintf(buf + strlen(buf), MAXBUF - strlen(buf) - 1, ",%ld [%s] ",  tv.tv_usec, strlevel(level));
     vsnprintf(buf + strlen(buf), MAXBUF - strlen(buf) - 1, fmt, ap);
@@ -42,6 +42,8 @@
    
     fflush(NULL); /* flushes all stdio output streams */
   }
+
+  
   void init();
 
 private:

--
Gitblit v1.8.0