This gives a slightly better look for the on screen logging, and wastes a couple less columns on the left end doing so.

Dick

Index: src/helper/log.c
===================================================================
--- src/helper/log.c	(revision 1260)
+++ src/helper/log.c	(working copy)
@@ -53,15 +53,17 @@

 static long long start;

-static char *log_strings[5] =
+
+static const char *log_strings[5] =
 {
-	"User:   ",
-	"Error:  ",
-	"Warning:",
-	"Info:   ",
-	"Debug:  "
+	"User : ",
+	"Error: ",
+	"Warn : ",  /* want a space after each colon, all same width, colons aligned */
+	"Info : ",
+	"Debug: "
 };

+
 static int count = 0;

 /* The log_puts() serves to somewhat different goals:
@@ -99,7 +101,7 @@
			struct mallinfo info;
			info = mallinfo();
 #endif
-			fprintf(log_output, "%s %d %d %s:%d %s()"
+			fprintf(log_output, "%s%d %d %s:%d %s()"
 #if PRINT_MEM()
					" %d"
 #endif
@@ -217,7 +219,7 @@
			LOG_WARNING("enabling log output as we are using pipes");
		}
	}
-
+
	return ERROR_OK;
 }
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to