diff options
author | pk33 <pk33@pk33.space> | 2024-11-11 18:06:18 +0100 |
---|---|---|
committer | pk33 <pk33@pk33.space> | 2024-11-11 18:06:18 +0100 |
commit | 5a54774474f43ae29716751d6415563a59b92c7d (patch) | |
tree | 151e865845b09b85992d8be20d8cc771d4110448 /include/logger33.h | |
parent | 146a683b8d8315ef15dc1c9286f0983834f48d88 (diff) | |
download | engine33-5a54774474f43ae29716751d6415563a59b92c7d.tar.gz |
tidying up and basic input
Diffstat (limited to 'include/logger33.h')
-rw-r--r-- | include/logger33.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/logger33.h b/include/logger33.h new file mode 100644 index 0000000..a489f67 --- /dev/null +++ b/include/logger33.h @@ -0,0 +1,26 @@ +#ifndef __LOGGER33_H__ +#define __LOGGER33_H__ + + +#include "types33.h" + + +#define _DEBUG 0 +#define _INFO 1 +#define _WARN 2 +#define _ERROR 3 /* will be fatal */ +#define _FATAL 4 + +#define LOGD( STR, ... ) _logger( _DEBUG, __FILE__, __LINE__, __FUNCTION__, STR, ##__VA_ARGS__ ); +#define LOGI( STR, ... ) _logger( _INFO, __FILE__, __LINE__, __FUNCTION__, STR, ##__VA_ARGS__ ); +#define LOGW( STR, ... ) _logger( _WARN, __FILE__, __LINE__, __FUNCTION__, STR, ##__VA_ARGS__ ); +#define LOGE( STR, ... ) _logger( _ERROR, __FILE__, __LINE__, __FUNCTION__, STR, ##__VA_ARGS__ ); +#define LOGF( STR, ... ) _logger( _FATAL, __FILE__, __LINE__, __FUNCTION__, STR, ##__VA_ARGS__ ); + + +Size logger33_init( void ); +void _logger( Size level, String file, int line, String function, const char *fmt, ... ); +void logger33_term( void ); + + +#endif /* __DISPLAY33_H__ */ |