Improve logging output

This commit is contained in:
Ian Barwick
2017-04-25 08:22:58 +09:00
parent ef5c6b37a4
commit 885bc122df
5 changed files with 23 additions and 6 deletions

16
log.c
View File

@@ -55,7 +55,7 @@ _stderr_log_with_level(const char *level_name, int level, const char *fmt, va_li
/*
* Store the requested level so that if there's a subsequent
* log_hint(), we can suppress that if appropriate.
* log_hint() or log_detail(), we can suppress that if appropriate.
*/
last_log_level = level;
@@ -97,6 +97,20 @@ log_hint(const char *fmt, ...)
}
void
log_detail(const char *fmt, ...)
{
va_list ap;
if (terse_logging == false)
{
va_start(ap, fmt);
_stderr_log_with_level("DETAIL", last_log_level, fmt, ap);
va_end(ap);
}
}
void
log_verbose(int level, const char *fmt, ...)
{