int writeLog(char *description,char *path,char *logType);
/*char *description - Your log Content or message*/
/*char *path - path to your log file or NULL (will be written to file named 'data')*/
/*char *logType - LogType can be (ERROR,WARNING,INFO,LOG,SUCCESS) so that log reader can perform filteration*/
#include <stdio.h>
#include <string.h>
#include "logr.h"
int main(){
writeLog("Your Log Description",NULL,"Log Type");
return 0;
}
Second Argument is path to the LOG FILE , path can be given in form of string like "file1" or you can leave it NULL it'll automatically create a log file named "data" and will store your all logs there. Example - "Hello my First LOG".
Third Argument logtype which will be used by our logViewer to parse the content into appropriate colors according to priority.
WARNING or wr - To Specify Warning Content in logs
ERROR or er - To Specify Error Content in logs
INFO or in - To Specify Information Content in logs
SUCCESS or su - To Specify Success Content in logs
LOG or lg - To Specify Genral Content in logs