projmr/Application/logger.c
2026-05-13 17:35:26 +04:00

70 lines
1.6 KiB
C

/*
* logger.c
*
* Copyright 2025
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*
*/
#if !defined(__LOGGER_C__)
#define __LOGGER_C__
#include <stdio.h>
#include <stdlib.h>
#include "../Library/project.h"
void __CREATE_SPECIF__(error_log) (const char* _err) {
fprintf(
stderr,
"\033[1m"
__STRING_PROJECT_NAME__
": \033[91m%s\033[0m\n",
_err
);
}
void __CREATE_SPECIF__(warning_log) (const char* _err) {
printf(
"\033[1m"
__STRING_PROJECT_NAME__
": \033[35m%s\033[0m\n",
_err
);
}
void __CREATE_SPECIF__(success_log) (const char* _err) {
printf(
"\033[1m"
__STRING_PROJECT_NAME__
": \033[32m%s\033[0m\n",
_err
);
}
void __CREATE_SPECIF__(info_log) (const char* _err) {
printf(
"\033[1m"
__STRING_PROJECT_NAME__
": \033[36m%s\033[0m\n",
_err
);
}
#endif /* __LOGGER_C__ */