@ -20,6 +20,13 @@ static const char *verbosity_colors[] = {
[ WLR_DEBUG ] = " \x1B [1;30m " ,
[ WLR_DEBUG ] = " \x1B [1;30m " ,
} ;
} ;
static const char * verbosity_headers [ ] = {
[ WLR_SILENT ] = " " ,
[ WLR_ERROR ] = " [ERROR] " ,
[ WLR_INFO ] = " [INFO] " ,
[ WLR_DEBUG ] = " [DEBUG] " ,
} ;
static void timespec_sub ( struct timespec * r , const struct timespec * a ,
static void timespec_sub ( struct timespec * r , const struct timespec * a ,
const struct timespec * b ) {
const struct timespec * b ) {
const long NSEC_PER_SEC = 1000000000 ;
const long NSEC_PER_SEC = 1000000000 ;
@ -58,6 +65,8 @@ static void log_stderr(enum wlr_log_importance verbosity, const char *fmt,
if ( colored & & isatty ( STDERR_FILENO ) ) {
if ( colored & & isatty ( STDERR_FILENO ) ) {
fprintf ( stderr , " %s " , verbosity_colors [ c ] ) ;
fprintf ( stderr , " %s " , verbosity_colors [ c ] ) ;
} else {
fprintf ( stderr , " %s " , verbosity_headers [ c ] ) ;
}
}
vfprintf ( stderr , fmt , args ) ;
vfprintf ( stderr , fmt , args ) ;