[Pkg-gnupg-commit] [gnupg2] 76/112: Avoid leading ": " in the log output when there are no prefixes.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Tue Aug 30 17:48:22 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 3a75ff65fba24ea2d024bd8fef633ab7d8f7d520
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Fri Aug 12 01:37:58 2016 -0400
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 at fifthhorseman.net>
---
common/logging.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/common/logging.c b/common/logging.c
index b6bafc7..c70ba35 100644
--- a/common/logging.c
+++ b/common/logging.c
@@ -687,14 +687,15 @@ do_logv (int level, int ignore_arg_ptr, const char *fmt, va_list arg_ptr)
else
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);
/* A leading backspace suppresses the extra space so that we can
correctly output, programname, filename and linenumber. */
if (fmt && *fmt == '\b')
fmt++;
else
- es_putc_unlocked (' ', logstream);
+ if (with_time || with_prefix || with_pid || force_prefixes)
+ es_putc_unlocked (' ', logstream);
}
switch (level)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list