Removed log function to log.c
This commit is contained in:
16
src/log.c
16
src/log.c
@@ -20,6 +20,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -161,6 +162,21 @@ log_msg(log_level_t level, const char * const area, const char * const msg)
|
||||
}
|
||||
}
|
||||
|
||||
log_level_t
|
||||
log_level_from_string(char *log_level)
|
||||
{
|
||||
assert(log_level != NULL);
|
||||
if (strcmp(log_level, "DEBUG") == 0) {
|
||||
return PROF_LEVEL_DEBUG;
|
||||
} else if (strcmp(log_level, "INFO") == 0) {
|
||||
return PROF_LEVEL_INFO;
|
||||
} else if (strcmp(log_level, "WARN") == 0) {
|
||||
return PROF_LEVEL_WARN;
|
||||
} else {
|
||||
return PROF_LEVEL_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_rotate_log_file(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user