aboutsummaryrefslogtreecommitdiff
path: root/src/util/common_logging.c
diff options
context:
space:
mode:
authorCarlo von lynX <lynX@time.to.get.psyced.org>2016-08-09 10:00:29 +0000
committerCarlo von lynX <lynX@time.to.get.psyced.org>2016-08-09 10:00:29 +0000
commitd9fa2fd38959b65f50baa3000ccfdcc0312f0ff7 (patch)
tree53f9a179c36c19d2cfa77e2c41b1c8578b0f134a /src/util/common_logging.c
parent9f91bbbdddc9c225e1c340d561c2c4504aeb5fe8 (diff)
downloadgnunet-d9fa2fd38959b65f50baa3000ccfdcc0312f0ff7.tar.gz
gnunet-d9fa2fd38959b65f50baa3000ccfdcc0312f0ff7.zip
end-user friendly output messages, ok like this?
Diffstat (limited to 'src/util/common_logging.c')
-rw-r--r--src/util/common_logging.c16
1 files changed, 15 insertions, 1 deletions
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,
801 if ( (NULL != GNUNET_stderr) && 801 if ( (NULL != GNUNET_stderr) &&
802 (NULL == loggers) ) 802 (NULL == loggers) )
803 { 803 {
804 FPRINTF (GNUNET_stderr, 804 if (kind == GNUNET_ERROR_TYPE_MESSAGE) {
805 /* The idea here is to produce "normal" output messages
806 * for end users while still having the power of the
807 * logging engine for developer needs. So ideally this
808 * is what it should look like when CLI tools are used
809 * interactively, yet the same message shouldn't look
810 * this way if the output is going to logfiles or robots
811 * instead. Is this the right place to do this? --lynX
812 */
813 FPRINTF (GNUNET_stderr,
814 "* %s",
815 msg);
816 } else {
817 FPRINTF (GNUNET_stderr,
805 "%s %s %s %s", 818 "%s %s %s %s",
806 datestr, 819 datestr,
807 comp, 820 comp,
808 GNUNET_error_type_to_string (kind), 821 GNUNET_error_type_to_string (kind),
809 msg); 822 msg);
823 }
810 fflush (GNUNET_stderr); 824 fflush (GNUNET_stderr);
811 } 825 }
812 pos = loggers; 826 pos = loggers;