Create loger.c

This commit is contained in:
Lia Brüggemann 2025-05-28 21:10:52 +02:00 committed by GitHub
parent 2849b67eaf
commit 95ced67e04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

29
c/loger.c Normal file
View file

@ -0,0 +1,29 @@
#include <stdio.h>
/*prints the given string in cyan
*/
void info(char message[]) {
printf(" \e[0;36m%s\e[0m\n", message);
return;
}
/*prints the given string in RED with a ERROR before
*/
void error(char message[]) {
printf("[\e[1;91mERROR\e[0m] \e[0;91m%s\e[0m\n", message);
return;
}
/*prints the given string in yellow with a INFO before
*/
void warning(char message[]) {
printf("[\e[1;93mINFO\e[0m] \e[0;93m%s\e[0m\n", message);
return;
}