logging: deprecate SYS_LOG_ macros
print a deprecation message when using deprecated SYS_LOG macros. Everything needs to move to the new logger interface. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
5540016965
commit
5c16be8813
1 changed files with 7 additions and 5 deletions
|
@ -104,20 +104,22 @@ void syslog_hook_install(void (*hook)(const char *, ...));
|
|||
LOG_BACKEND_CALL(log_lv, log_color, log_format, \
|
||||
SYS_LOG_COLOR_OFF, ##__VA_ARGS__)
|
||||
|
||||
#define SYS_LOG_ERR(...) LOG_COLOR(SYS_LOG_TAG_ERR, SYS_LOG_COLOR_RED, \
|
||||
##__VA_ARGS__)
|
||||
#define SYS_LOG_ERR(...) __DEPRECATED_MACRO \
|
||||
LOG_COLOR(SYS_LOG_TAG_ERR, SYS_LOG_COLOR_RED, ##__VA_ARGS__)
|
||||
|
||||
#if (SYS_LOG_LEVEL >= SYS_LOG_LEVEL_WARNING)
|
||||
#define SYS_LOG_WRN(...) LOG_COLOR(SYS_LOG_TAG_WRN, \
|
||||
#define SYS_LOG_WRN(...) __DEPRECATED_MACRO LOG_COLOR(SYS_LOG_TAG_WRN, \
|
||||
SYS_LOG_COLOR_YELLOW, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#if (SYS_LOG_LEVEL >= SYS_LOG_LEVEL_INFO)
|
||||
#define SYS_LOG_INF(...) LOG_NO_COLOR(SYS_LOG_TAG_INF, ##__VA_ARGS__)
|
||||
#define SYS_LOG_INF(...) __DEPRECATED_MACRO \
|
||||
LOG_NO_COLOR(SYS_LOG_TAG_INF, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#if (SYS_LOG_LEVEL == SYS_LOG_LEVEL_DEBUG)
|
||||
#define SYS_LOG_DBG(...) LOG_NO_COLOR(SYS_LOG_TAG_DBG, ##__VA_ARGS__)
|
||||
#define SYS_LOG_DBG(...) __DEPRECATED_MACRO \
|
||||
LOG_NO_COLOR(SYS_LOG_TAG_DBG, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue