From 0f6fd6b8007e67bd188710be9984636b4dcccefa Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 2 Jun 2014 13:16:25 +0100 Subject: [PATCH] Add an extra logging verbosity level. Now, when run without arguments, the final result is printed. --- framebuffer/convert_font.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/framebuffer/convert_font.c b/framebuffer/convert_font.c index 40cf58929..961a949ed 100644 --- a/framebuffer/convert_font.c +++ b/framebuffer/convert_font.c @@ -44,6 +44,7 @@ enum font_style { enum log_level { LOG_DEBUG, LOG_INFO, + LOG_RESULT, LOG_WARNING, LOG_ERROR }; @@ -1030,7 +1031,7 @@ bool load_font(const char *path, struct font_data **data) count += ctx.count[i]; } - LOG(LOG_INFO, " Total %i gylphs " + LOG(LOG_RESULT, " Total %i gylphs " "(of which %i unique, %i codepoints, %i duplicates)\n", count, d->glyphs, ctx.codepoints, count - d->glyphs - ctx.codepoints); @@ -1050,7 +1051,7 @@ int main(int argc, char** argv) bool ok; int i; - level = LOG_WARNING; + level = LOG_RESULT; /* Handle program arguments */ for (i = 1; i < argc; i++) { @@ -1076,7 +1077,7 @@ int main(int argc, char** argv) level = LOG_DEBUG; } else if (argc >= 3 && (strcmp(argv[i], "-q") == 0 || strcmp(argv[i], "--quiet") == 0)) { - level = LOG_ERROR; + level = LOG_WARNING; } continue;