diff --git a/include/zephyr/arch/exception.h b/include/zephyr/arch/exception.h index 68487be0cbd..b72e6d56766 100644 --- a/include/zephyr/arch/exception.h +++ b/include/zephyr/arch/exception.h @@ -8,6 +8,12 @@ #ifndef ZEPHYR_INCLUDE_ARCH_EXCEPTION_H_ #define ZEPHYR_INCLUDE_ARCH_EXCEPTION_H_ +#if defined(CONFIG_LOG) +#define EXCEPTION_DUMP(...) LOG_ERR(__VA_ARGS__) +#else +#define EXCEPTION_DUMP(format, ...) printk(format "\n", ##__VA_ARGS__) +#endif + #if defined(CONFIG_X86_64) #include #elif defined(CONFIG_X86)