Add LOG_HEAP log type, and more heap debug messages (#7937)

This commit is contained in:
Jonathan Bennett
2025-09-09 10:29:07 -05:00
committed by GitHub
parent d1d16fc25f
commit e7741c20e4
9 changed files with 47 additions and 8 deletions

View File

@@ -23,6 +23,7 @@
#define MESHTASTIC_LOG_LEVEL_ERROR "ERROR"
#define MESHTASTIC_LOG_LEVEL_CRIT "CRIT "
#define MESHTASTIC_LOG_LEVEL_TRACE "TRACE"
#define MESHTASTIC_LOG_LEVEL_HEAP "HEAP"
#include "SerialConsole.h"
@@ -62,6 +63,12 @@
#endif
#endif
#if defined(DEBUG_HEAP)
#define LOG_HEAP(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_HEAP, __VA_ARGS__)
#else
#define LOG_HEAP(...)
#endif
/// A C wrapper for LOG_DEBUG that can be used from arduino C libs that don't know about C++ or meshtastic
extern "C" void logLegacy(const char *level, const char *fmt, ...);