mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
Avoid leading ": " in the log output when there are no prefixes.
* common/logging.c (do_logv): When no prefixes have been requested, omit the ": " separator, since there is nothing on the left-hand side of it. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
This commit is contained in:
parent
61c2a1fa6d
commit
3a75ff65fb
@ -687,14 +687,15 @@ do_logv (int level, int ignore_arg_ptr, const char *fmt, va_list arg_ptr)
|
|||||||
else
|
else
|
||||||
es_fprintf_unlocked (logstream, "[%u]", (unsigned int)getpid ());
|
es_fprintf_unlocked (logstream, "[%u]", (unsigned int)getpid ());
|
||||||
}
|
}
|
||||||
if (!with_time || force_prefixes)
|
if ((!with_time && (with_prefix || with_pid)) || force_prefixes)
|
||||||
es_putc_unlocked (':', logstream);
|
es_putc_unlocked (':', logstream);
|
||||||
/* A leading backspace suppresses the extra space so that we can
|
/* A leading backspace suppresses the extra space so that we can
|
||||||
correctly output, programname, filename and linenumber. */
|
correctly output, programname, filename and linenumber. */
|
||||||
if (fmt && *fmt == '\b')
|
if (fmt && *fmt == '\b')
|
||||||
fmt++;
|
fmt++;
|
||||||
else
|
else
|
||||||
es_putc_unlocked (' ', logstream);
|
if (with_time || with_prefix || with_pid || force_prefixes)
|
||||||
|
es_putc_unlocked (' ', logstream);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (level)
|
switch (level)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user