Print error and debug to stderr

This commit is contained in:
x3 2023-08-08 21:33:13 +02:00
parent f1ed4b0944
commit d6fc97a87d
Signed by: x3
GPG Key ID: 7E9961E8AD0E240E
1 changed files with 6 additions and 6 deletions

View File

@ -20,9 +20,9 @@ void uio_error(const char *format, ...)
va_list ap;
va_start(ap, format);
printf("\033[31m[ERROR]: ");
vprintf(format, ap);
printf("\033[0m\n");
fprintf(stderr, "\033[31m[ERROR]: ");
vfprintf(stderr, format, ap);
fprintf(stderr, "\033[0m\n");
va_end(ap);
}
@ -38,9 +38,9 @@ void uio_debug(const char *format, ...)
va_start(ap, format);
printf("\033[35m[DEBUG]: ");
vprintf(format, ap);
printf("\033[0m\n");
fprintf(stderr, "\033[35m[DEBUG]: ");
vfprintf(stderr, format, ap);
fprintf(stderr, "\033[0m\n");
va_end(ap);
}