Browse Source

Make errors in jackdbus log red

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2377 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
nedko 17 years ago
parent
commit
16b7353557
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      linux/dbus/jackdbus.c

+ 6
- 1
linux/dbus/jackdbus.c View File

@@ -507,6 +507,11 @@ jack_dbus_info_callback(const char *msg)
fflush(g_logfile);
}

#define ANSI_BOLD_ON "\033[1m"
#define ANSI_BOLD_OFF "\033[22m"
#define ANSI_COLOR_RED "\033[31m"
#define ANSI_RESET "\033[0m"

void
jack_dbus_error_callback(const char *msg)
{
@@ -517,7 +522,7 @@ jack_dbus_error_callback(const char *msg)
ctime_r(&timestamp, timestamp_str);
timestamp_str[24] = 0;

fprintf(g_logfile, "%s: ERROR: %s\n", timestamp_str, msg);
fprintf(g_logfile, "%s: " ANSI_BOLD_ON ANSI_COLOR_RED "ERROR: %s" ANSI_RESET "\n", timestamp_str, msg);
fflush(g_logfile);
}



Loading…
Cancel
Save