summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-12-19 19:40:38 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-12-19 19:40:38 +0000
commitca805a472ccc3daf262ff67f0a87ca2b419ca020 (patch)
tree58018a58bb5b79e804d1faefa03bcd5ec8a01fcb /src
parent865c5dcc2a0d27ded9135acf7fd1066f55acf5ca (diff)
downloadopenocd_libswd-ca805a472ccc3daf262ff67f0a87ca2b419ca020.tar.gz
openocd_libswd-ca805a472ccc3daf262ff67f0a87ca2b419ca020.tar.bz2
openocd_libswd-ca805a472ccc3daf262ff67f0a87ca2b419ca020.tar.xz
openocd_libswd-ca805a472ccc3daf262ff67f0a87ca2b419ca020.zip
Dick Hollenbeck <dick@softplc.com> better logging
git-svn-id: svn://svn.berlios.de/openocd/trunk@1262 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/helper/log.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/helper/log.c b/src/helper/log.c
index 8e320084..b42bd9eb 100644
--- a/src/helper/log.c
+++ b/src/helper/log.c
@@ -55,13 +55,14 @@ static long long start;
static 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 +100,7 @@ static void log_puts(enum log_levels level, const char *file, int line, const ch
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 +218,7 @@ int handle_debug_level_command(struct command_context_s *cmd_ctx, char *cmd, cha
LOG_WARNING("enabling log output as we are using pipes");
}
}
-
+
return ERROR_OK;
}