Skip to content

Commit

Permalink
[MXCHIP] print mbedtls log level -> nanomq log level
Browse files Browse the repository at this point in the history
  • Loading branch information
mxchipwanges committed Feb 23, 2024
1 parent ba5176b commit a910002
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/supplemental/tls/mbedtls/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ tls_dbg(void *ctx, int level, const char *file, int line, const char *s)
NNI_ARG_UNUSED(ctx);
NNI_ARG_UNUSED(level);
snprintf(buf, sizeof(buf), "%s:%04d: %s", file, line, s);
log_debug("****[mbedtls log(%d)] %s", level, buf);

#ifdef CONFIG_MXCHIP_DEBUG
/* mbedtls log level to nanomq log level */
Expand All @@ -94,6 +95,7 @@ tls_dbg(void *ctx, int level, const char *file, int line, const char *s)
break;
}
/* mbedtls log output to nanomq log */
log_debug("**** mbedtls log(%d -> %d)nanomq log", level, nanomq_log_level);
log_log(nanomq_log_level, "tls.c", __LINE__, __FUNCTION__, "%s", buf);
#else
nni_plat_println(buf);
Expand Down

0 comments on commit a910002

Please sign in to comment.