Commit c47c87ab authored by anozdrin/alik@alik's avatar anozdrin/alik@alik

IM polishing: log more information in log.

parent d8096799
...@@ -52,8 +52,10 @@ static inline void log(FILE *file, const char *format, va_list args) ...@@ -52,8 +52,10 @@ static inline void log(FILE *file, const char *format, va_list args)
struct tm bd_time; // broken-down time struct tm bd_time; // broken-down time
localtime_r(&now, &bd_time); localtime_r(&now, &bd_time);
char buff_date[32]; char buff_date[128];
sprintf(buff_date, "%02d%02d%02d %2d:%02d:%02d\t", sprintf(buff_date, "[%d/%lu] [%02d/%02d/%02d %02d:%02d:%02d] ",
(int) getpid(),
(unsigned long) pthread_self(),
bd_time.tm_year % 100, bd_time.tm_year % 100,
bd_time.tm_mon + 1, bd_time.tm_mon + 1,
bd_time.tm_mday, bd_time.tm_mday,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment