diff --git a/src/supplemental/nanolib/log.c b/src/supplemental/nanolib/log.c index e86f3957f..b952de2bc 100644 --- a/src/supplemental/nanolib/log.c +++ b/src/supplemental/nanolib/log.c @@ -311,7 +311,11 @@ log_log(int level, const char *file, int line, const char *func, for (int i = 0; i < MAX_CALLBACKS && L.callbacks[i].fn; i++) { log_callback *cb = &L.callbacks[i]; +#ifdef CONFIG_MXCHIP_FORCE_DEBUG_LOG + if(1) { // enable all log +#else if (level <= cb->level) { +#endif init_event(&ev, cb->udata, cb->config); va_start(ev.ap, fmt); if (cb->mtx == NULL) { diff --git a/src/supplemental/tls/mbedtls/tls.c b/src/supplemental/tls/mbedtls/tls.c index d9f8883b9..8c8f7c1be 100644 --- a/src/supplemental/tls/mbedtls/tls.c +++ b/src/supplemental/tls/mbedtls/tls.c @@ -723,8 +723,12 @@ nng_tls_engine_init_mbed(void) nni_mtx_init(&ssl_conn_lock); #ifdef CONFIG_MXCHIP_DEBUG_TLS +#ifdef CONFIG_MXCHIP_FORCE_DEBUG_LOG + mbedtls_debug_set_threshold(4); // enable all log +#else // mbedtls log level read from nanomq conf mbedtls_debug_set_threshold(nanomq_log_level_to_mbedtls(log_get_level())); +#endif #else // Uncomment the following to have noisy debug from mbedTLS.