mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #5037
5037: Add logging macros `log_{error,warn,info,debug,trace}` r=def- a=heinrich5991 This makes it almost as short to log as with `dbg_msg` (one to two more characters), and much shorter than `Console()->Print(IConsole::OUTPUT_LEVEL_{STANDARD,ADDINFO,DEBUG})`. Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
This commit is contained in:
commit
68b6027114
|
@ -30,6 +30,12 @@ struct LOG_COLOR
|
||||||
uint8_t b;
|
uint8_t b;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define log_error(sys, ...) log_log(LEVEL_ERROR, sys, __VA_ARGS__)
|
||||||
|
#define log_warn(sys, ...) log_log(LEVEL_WARN, sys, __VA_ARGS__)
|
||||||
|
#define log_info(sys, ...) log_log(LEVEL_INFO, sys, __VA_ARGS__)
|
||||||
|
#define log_debug(sys, ...) log_log(LEVEL_DEBUG, sys, __VA_ARGS__)
|
||||||
|
#define log_trace(sys, ...) log_log(LEVEL_TRACE, sys, __VA_ARGS__)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup Log
|
* @defgroup Log
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue