Removed log function to log.c

This commit is contained in:
James Booth
2013-02-03 00:27:43 +00:00
parent 7d6ce4da02
commit c90c83f7e1
3 changed files with 18 additions and 16 deletions

View File

@@ -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)
{