Browse Source

- added patch to remove count and time information from log_printf

in case of debug_level is not set to LOG_DEBUG

git-svn-id: svn://svn.berlios.de/openocd/trunk@320 b42882b7-edfa-0310-969c-e2dbd0fdcd60
tags/v0.1.0
mifi 16 years ago
parent
commit
c1eb1a3690
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      src/helper/log.c

+ 11
- 1
src/helper/log.c View File

@@ -69,7 +69,17 @@ void log_printf(enum log_levels level, const char *file, int line, const char *f
if (f != NULL)
file = f + 1;

fprintf(log_output, "%s %d %ld %s:%d %s(): %s\n", log_strings[level+1], count, time(NULL), file, line, function, buffer);
if (debug_level >= LOG_DEBUG)
{
/* print with count and time information */
fprintf(log_output, "%s %d %ld %s:%d %s(): %s\n", log_strings[level+1], count, time(NULL), file, line, function, buffer);
}
else
{
/* do not print count and time */
fprintf(log_output, "%s %s:%d %s(): %s\n", log_strings[level+1], file, line, function, buffer);
}

fflush(log_output);
va_end(args);


Loading…
Cancel
Save