Fork me on GitHub

Logr.h

A micro library to create logs for your next POSIX thing.BSD Licence

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*/


Example

#include <stdio.h>
#include <string.h>
#include "logr.h"

int main(){

	writeLog("Your Log Description",NULL,"Log Type");
	return 0;
}


Description (string)

The First Argument contains the basic content which should be contained in that particular log TAG. Example - "Hello my First LOG".

Path (string)

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".

logType (string)

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

Logr Automatically Logs Date and Time of Event



However In Genral Case Logs are not in best manner to read.


So here's logrReader whcih parse's logs with beauty making it much eaiser to go through all your logs



Github / Fork it!

View the Project on GitHub

Licence

This Project is under BSD Licence Contact me - flouthoc@gmail.com