From: Carlo von lynX Date: Tue, 9 Aug 2016 10:00:29 +0000 (+0000) Subject: end-user friendly output messages, ok like this? X-Git-Tag: initial-import-from-subversion-38251~408 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d9fa2fd38959b65f50baa3000ccfdcc0312f0ff7;p=oweals%2Fgnunet.git end-user friendly output messages, ok like this? --- diff --git a/src/util/common_logging.c b/src/util/common_logging.c index ecbe69443..a391d0b9e 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c @@ -801,12 +801,26 @@ output_message (enum GNUNET_ErrorType kind, if ( (NULL != GNUNET_stderr) && (NULL == loggers) ) { - FPRINTF (GNUNET_stderr, + if (kind == GNUNET_ERROR_TYPE_MESSAGE) { + /* The idea here is to produce "normal" output messages + * for end users while still having the power of the + * logging engine for developer needs. So ideally this + * is what it should look like when CLI tools are used + * interactively, yet the same message shouldn't look + * this way if the output is going to logfiles or robots + * instead. Is this the right place to do this? --lynX + */ + FPRINTF (GNUNET_stderr, + "* %s", + msg); + } else { + FPRINTF (GNUNET_stderr, "%s %s %s %s", datestr, comp, GNUNET_error_type_to_string (kind), msg); + } fflush (GNUNET_stderr); } pos = loggers;