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:
bors[bot] 2022-05-01 10:10:22 +00:00 committed by GitHub
commit 68b6027114
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,6 +30,12 @@ struct LOG_COLOR
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
*