diff --git a/simplelog.h b/simplelog.h new file mode 100644 index 0000000..d3ae253 --- /dev/null +++ b/simplelog.h @@ -0,0 +1,23 @@ +// Simple Logger +// Created by Kiritow (github.com/kiritow) + +#ifndef _kiritow_logger_simplelog_h +#define _kiritow_logger_simplelog_h + +// 0 None (Silent) +// 1 Error +// 2 Error, Warning +// 3 Error, Warning, Info +// 4 Error, Warning, Info, Debug + +#ifndef CONFIG_LOG_LEVEL +#define CONFIG_LOG_LEVEL 4 +#endif + +#if (CONFIG_LOG_LEVEL==0) +#define dprintf(fmt,...) +#else +#define dprintf(fmt,...) printf(fmt,##__VA_ARGS__) +#endif + +#endif // End of _kiritow_logger_simplelog_h \ No newline at end of file