1 /*========================================================================== 2 epub2txt v2 3 log.h 4 Copyright (c)2020 Kevin Boone, GPL v3.0 5 *==========================================================================*/ 6 7 #pragma once 8 9 #define ERROR 0 10 #define WARNING 1 11 #define INFO 2 12 #define DEBUG 3 13 #define TRACE 4 14 15 #define IN log_trace ("Entering %s", __PRETTY_FUNCTION__); 16 #define OUT log_trace ("Leaving %s", __PRETTY_FUNCTION__); 17 18 void log_error (const char *fmt,...); 19 void log_warning (const char *fmt,...); 20 void log_info (const char *fmt,...); 21 void log_debug (const char *fmt,...); 22 void log_trace (const char *fmt,...); 23 void log_set_level (const int level); 24