You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
386 B
21 lines
386 B
#include <stdarg.h> |
|
#include <stdio.h> |
|
#include <string.h> |
|
|
|
#include "common.h" |
|
#include "log.h" |
|
|
|
#define LOGLINE_MAX 1024 |
|
|
|
void log_msg(log_msgtype_t l, const char *fmt, ...) { |
|
va_list args; |
|
char line[LOGLINE_MAX] = ""; |
|
char msg[LOGLINE_MAX] = ""; |
|
|
|
va_start(args, fmt); |
|
snprintf(msg, sizeof(msg), fmt, args); |
|
va_end(args); |
|
strncat(line, msg, sizeof(line)); |
|
|
|
return; |
|
}
|
|
|