#include #include #include namespace chip { namespace DeviceLayer { /** * Called whenever a log message is emitted by Chip or LwIP. * * This function is intended be overridden by the application to, e.g., * schedule output of queued log entries. */ void __attribute__((weak)) OnLogOutput(void) {} } // namespace DeviceLayer } // namespace chip namespace chip { namespace Logging { namespace Platform { /** * CHIP log output functions. */ void LogV(const char * module, uint8_t category, const char * msg, va_list v) { #if PSOC6_LOG_ENABLED && _CHIP_USE_LOGGING printf("CHIP:%s: ", module); vprintf(msg, v); printf("\n"); // Let the application know that a log message has been emitted. DeviceLayer::OnLogOutput(); #endif } extern "C" void PSOC6Log(const char * aFormat, ...) { va_list v; va_start(v, aFormat); LogV("PSOC6", chip::Logging::kLogCategory_Progress, aFormat, v); va_end(v); } } // namespace Platform } // namespace Logging } // namespace chip