Upload files to "src"
This commit is contained in:
parent
87e9f06315
commit
9bf45d3378
79
src/log.c
Normal file
79
src/log.c
Normal file
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* infolog
|
||||
*
|
||||
* DESCRIPTION: Output a stylized info message.
|
||||
* PARAMETERS: char MSG[]
|
||||
* DEFINED IN: log.h
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
infolog(char MSG[])
|
||||
{
|
||||
if (MSG == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
printf(COL_BLUE "[i]" COL_RESET " %s\n", MSG);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* warnlog
|
||||
*
|
||||
* DESCRIPTION: Output a stylized warning message.
|
||||
* Parameters: char MSG[]
|
||||
* DEFINED IN: log.h
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
warnlog(char MSG[])
|
||||
{
|
||||
if (MSG == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
printf(COL_YELLOW "[!]" COL_RESET " %s\n", MSG);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* errlog
|
||||
*
|
||||
* DESCRIPTION: Output a stylized error message.
|
||||
* PARAMETERS: char MSG[]
|
||||
* DEFINED IN: log.h
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
errlog(char MSG[])
|
||||
{
|
||||
if (MSG == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
fprintf(stderr, COL_RED "[x]" COL_RESET " %s\n", MSG);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* successlog
|
||||
*
|
||||
* DESCRIPTION: Output a stylized success message.
|
||||
* PARAMETERS: char MSG[]
|
||||
* DEFINED IN: log.h
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
successlog(char MSG[])
|
||||
{
|
||||
if (MSG == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
printf(COL_GREEN "[*]" COL_RESET " %s\n", MSG);
|
||||
return;
|
||||
}
|
Loading…
Reference in New Issue
Block a user