| 14 |
* * |
* * |
| 15 |
***************************************************************************/ |
***************************************************************************/ |
| 16 |
|
|
| 17 |
|
#define _POSIX_C_SOURCE 200809L |
| 18 |
|
|
| 19 |
#include "log.h" |
#include "log.h" |
| 20 |
#include "io.h" |
#include "io.h" |
| 21 |
#include "common.h" |
#include "common.h" |
| 22 |
#include <stdarg.h> |
#include <stdarg.h> |
| 23 |
#include <sys/types.h> |
#include <string.h> |
| 24 |
#include <time.h> |
#include <time.h> |
| 25 |
#include <unistd.h> |
#include <unistd.h> |
| 26 |
|
#include <sys/types.h> |
|
#define _POSIX_C_SOURCE 200809L |
|
|
#include <string.h> |
|
| 27 |
|
|
| 28 |
#define STR_LOG_TIME_MAX_LEN 50 |
#define STR_LOG_TIME_MAX_LEN 50 |
| 29 |
|
|
| 71 |
} |
} |
| 72 |
else // if (log_level == LOG_LEVEL_ERROR) |
else // if (log_level == LOG_LEVEL_ERROR) |
| 73 |
{ |
{ |
| 74 |
snprintf(buf, len, "[%s] [%d] [ERROR] [%s : %d] ", s_time, getpid(), app_file, app_line); |
snprintf(buf, len, "[%s] [%d] [ERROR] [%s:%d] ", s_time, getpid(), app_file, app_line); |
| 75 |
} |
} |
| 76 |
} |
} |
| 77 |
|
|