shithub: sox

Download patch

ref: cea320c1bceb6393fb8dac58822e0271b0928b4c
parent: f181687fefb3d4225c1aa372e40047975a4a67b2
author: robs <robs>
date: Fri Feb 20 12:53:30 EST 2009

display message category

--- a/src/sox.c
+++ b/src/sox.c
@@ -2538,8 +2538,9 @@
 
 static void output_message(unsigned level, const char *filename, const char *fmt, va_list ap)
 {
+  char const * const str[] = {"FAIL", "WARN", "INFO", "DBUG"};
   if (sox_globals.verbosity >= level) {
-    fprintf(stderr, "%s ", myname);
+    fprintf(stderr, "%s %s ", myname, str[min(level - 1, 3)]);
     sox_output_message(stderr, filename, fmt, ap);
     fprintf(stderr, "\n");
   }