2022-01-04 13:41:25 +03:00
|
|
|
#if defined(__GNUC__) && !defined(__LCC__)
|
|
|
|
|
2022-11-15 01:08:23 +03:00
|
|
|
#pragma push_macro("TRACE")
|
|
|
|
#pragma push_macro("DEBUG")
|
|
|
|
#pragma push_macro("VERBOSE")
|
|
|
|
#pragma push_macro("NOTICE")
|
|
|
|
#pragma push_macro("WARNING")
|
|
|
|
#pragma push_macro("ERROR")
|
|
|
|
#pragma push_macro("eASSERT")
|
2019-11-13 03:20:25 +03:00
|
|
|
|
2022-11-15 01:08:23 +03:00
|
|
|
#undef TRACE
|
|
|
|
#define TRACE(fmt, ...) \
|
|
|
|
debug_log(MDBX_LOG_TRACE, __func__, __LINE__, fmt "\n", __VA_ARGS__)
|
2019-11-13 03:20:25 +03:00
|
|
|
|
2022-11-15 01:08:23 +03:00
|
|
|
#undef DEBUG
|
|
|
|
#define DEBUG(fmt, ...) \
|
|
|
|
debug_log(MDBX_LOG_DEBUG, __func__, __LINE__, fmt "\n", __VA_ARGS__)
|
2019-11-13 03:20:25 +03:00
|
|
|
|
2022-11-15 01:08:23 +03:00
|
|
|
#undef VERBOSE
|
|
|
|
#define VERBOSE(fmt, ...) \
|
|
|
|
debug_log(MDBX_LOG_VERBOSE, __func__, __LINE__, fmt "\n", __VA_ARGS__)
|
2019-11-13 03:20:25 +03:00
|
|
|
|
2022-11-15 01:08:23 +03:00
|
|
|
#undef NOTICE
|
|
|
|
#define NOTICE(fmt, ...) \
|
|
|
|
debug_log(MDBX_LOG_NOTICE, __func__, __LINE__, fmt "\n", __VA_ARGS__)
|
2019-11-13 03:20:25 +03:00
|
|
|
|
2022-11-15 01:08:23 +03:00
|
|
|
#undef WARNING
|
|
|
|
#define WARNING(fmt, ...) \
|
|
|
|
debug_log(MDBX_LOG_WARN, __func__, __LINE__, fmt "\n", __VA_ARGS__)
|
2019-11-13 03:20:25 +03:00
|
|
|
|
2022-11-15 01:08:23 +03:00
|
|
|
#undef ERROR
|
|
|
|
#define ERROR(fmt, ...) \
|
|
|
|
debug_log(MDBX_LOG_ERROR, __func__, __LINE__, fmt "\n", __VA_ARGS__)
|
2019-11-13 03:20:25 +03:00
|
|
|
|
2022-11-15 01:08:23 +03:00
|
|
|
#undef eASSERT
|
|
|
|
#define eASSERT(env, expr) ENSURE(env, expr)
|
2020-10-26 09:22:25 +03:00
|
|
|
|
2022-01-04 13:41:25 +03:00
|
|
|
#if !defined(__clang__)
|
2022-11-15 01:08:23 +03:00
|
|
|
#pragma GCC optimize("-Og")
|
2022-01-04 13:41:25 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* GCC only */
|