Print error and debug to stderr
This commit is contained in:
parent
f1ed4b0944
commit
d6fc97a87d
12
src/uio.c
12
src/uio.c
@ -20,9 +20,9 @@ void uio_error(const char *format, ...)
|
|||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
|
|
||||||
printf("\033[31m[ERROR]: ");
|
fprintf(stderr, "\033[31m[ERROR]: ");
|
||||||
vprintf(format, ap);
|
vfprintf(stderr, format, ap);
|
||||||
printf("\033[0m\n");
|
fprintf(stderr, "\033[0m\n");
|
||||||
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
@ -38,9 +38,9 @@ void uio_debug(const char *format, ...)
|
|||||||
|
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
|
|
||||||
printf("\033[35m[DEBUG]: ");
|
fprintf(stderr, "\033[35m[DEBUG]: ");
|
||||||
vprintf(format, ap);
|
vfprintf(stderr, format, ap);
|
||||||
printf("\033[0m\n");
|
fprintf(stderr, "\033[0m\n");
|
||||||
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user