47 lines
1.0 KiB
C
47 lines
1.0 KiB
C
#ifndef __SMCC_LEXER_LOG_H__
|
|
#define __SMCC_LEXER_LOG_H__
|
|
|
|
#include <lib/rt/rt.h>
|
|
|
|
#ifndef LEX_LOG_LEVEL
|
|
#define LEX_LOG_LEVEL 4
|
|
#endif
|
|
|
|
#if LEX_LOG_LEVEL <= 1
|
|
#define LEX_NOTSET( fmt, ...) LOG_NOTSET("LEXER: " fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define LEX_NOTSET( fmt, ...)
|
|
#endif
|
|
|
|
#if LEX_LOG_LEVEL <= 2
|
|
#define LEX_DEBUG( fmt, ...) LOG_DEBUG( "LEXER: " fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define LEX_DEBUG( fmt, ...)
|
|
#endif
|
|
|
|
#if LEX_LOG_LEVEL <= 3
|
|
#define LEX_INFO( fmt, ...) LOG_INFO( "LEXER: " fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define LEX_INFO( fmt, ...)
|
|
#endif
|
|
|
|
#if LEX_LOG_LEVEL <= 4
|
|
#define LEX_WARN( fmt, ...) LOG_WARN( "LEXER: " fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define LEX_WARN( fmt, ...)
|
|
#endif
|
|
|
|
#if LEX_LOG_LEVEL <= 5
|
|
#define LEX_ERROR( fmt, ...) LOG_ERROR("LEXER: " fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define LEX_ERROR( fmt, ...)
|
|
#endif
|
|
|
|
#if LEX_LOG_LEVEL <= 6
|
|
#define LEX_FATAL( fmt, ...) LOG_FATAL("LEXER: " fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define LEX_FATAL( fmt, ...)
|
|
#endif
|
|
|
|
#endif // __SMCC_LEXER_LOG_H__
|