CLog is a simple and customizable logger for your C programs. It contains 5 different methods similar to printf, with the only difference that they add a new line at the end.
debugf(const char *format, ...)infof(const char *format, ...)warnf(const char *format, ...)errorf(const char *format, ...)panicf(const char *format, ...)this method stops the program, be useful while using it
CLog is simple and you can customize it by changing logConfig. Ex:
// Usage
logConfig[DEBUG_COLOR] = 4;The configurations CLog allows are:
DEBUG_COLOR: Color of the Debug TagINFO_COLOR: Color of the Info TagWARN_COLOR: Color of the Warning TagERROR_COLOR: Color of the Error TagPANIC_COLOR: Color of the Panic TagPANIC_BCKG: Background Color of the Panic Tag
For all the options you can set a color from this table:
| Color | Number |
|---|---|
| Dark Blue | 0 |
| Red | 1 |
| Green | 2 |
| Yellow | 3 |
| Light Blue | 4 |
| Magenta | 5 |
| Cyan | 6 |
| Cream | 7 |
| White | 8 |