diff options
-rw-r--r-- | src/util/common_logging.c | 16 |
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; |