Make verbose command line option useful on top of

the new logging infrastructure.
This commit is contained in:
Greg Smith
2011-02-23 05:29:29 -05:00
parent fee7da1ba7
commit 3b2203c38c
4 changed files with 35 additions and 7 deletions

11
log.c
View File

@@ -130,6 +130,17 @@ bool logger_shutdown(void)
return true;
}
/*
* Set a minimum logging level. Intended for command line verbosity
* options, which might increase requested logging over what's specified
* in the regular configuration file.
*/
void logger_min_verbose(int minimum)
{
if (log_level < minimum)
log_level = minimum;
}
int detect_log_level(const char* level)
{
if (!strcmp(level, "DEBUG"))