msc_vlr_tests: log descriptions in color with -v

Change-Id: I2b28a94a5b27932e343952ba82e7e11c46f5e87d
This commit is contained in:
Neels Hofmeyr 2019-10-21 06:06:27 +02:00
parent 07351d8f78
commit 35fb679ab0
1 changed files with 4 additions and 1 deletions

View File

@ -35,9 +35,12 @@
#include <osmocom/msc/rtp_stream.h>
extern bool _log_lines;
#define LOG_COLOR "\033[1;33m"
#define LOG_COLOR_OFF "\033[0;m"
#define _log(fmt, args...) do { \
if (_log_lines) \
fprintf(stderr, " %4d:%s: " fmt "\n", \
fprintf(stderr, LOG_COLOR " %4d:%s: " fmt LOG_COLOR_OFF "\n", \
__LINE__, __FILE__, ## args ); \
else \
fprintf(stderr, fmt "\n", ## args ); \