Skip to content

Commit

Permalink
enhance messages format.
Browse files Browse the repository at this point in the history
  • Loading branch information
neomilium committed Feb 22, 2010
1 parent b9201b4 commit f9b03b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/debug/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ void debug_print(int level, const char *file, int line, const char *format, ...)
if (debug_level >= level) {
/* is stdout is a tty */
if (isatty(1)) {
const char *t = "\033[34mDEBUG"; /* blue */
const char *t = "\033[34mDBG:"; /* blue */

if (-1 == level)
t = "\033[31mERROR"; /* red */
t = "\033[31mERR:"; /* red */
else if (0 == level)
t = ""; /* standard color */

/* print preamble */
if ( level > 0 ) printf("%s:%s:%d: ", t, file, line);
if ( level > 0 ) printf("%s%s:%d: ", t, file, line);
else printf("%s", t);

/* print message */
Expand Down

0 comments on commit f9b03b7

Please sign in to comment.