diff --git a/shell/full/src/base/shell_lk.c b/shell/full/src/base/shell_lk.c index a9606bd865931badf4bf7f300a946cb173f4df33..5cf4138798d6122a936d8eb0d4493f8e91d3e7b3 100644 --- a/shell/full/src/base/shell_lk.c +++ b/shell/full/src/base/shell_lk.c @@ -40,6 +40,7 @@ #endif #include "los_init.h" #include "los_printf_pri.h" +#include "los_process_pri.h" #ifdef LOSCFG_SHELL_LK @@ -189,7 +190,9 @@ VOID OsLkDefaultFunc(INT32 level, const CHAR *func, INT32 line, const CHAR *fmt, return; } if ((level != LOS_COMMON_LEVEL) && ((level > LOS_EMG_LEVEL) && (level <= LOS_TRACE_LEVEL))) { - dprintf("[%s]", OsLogLvGet(level)); + dprintf("[%s][%s:%s]", OsLogLvGet(level), + ((OsCurrProcessGet() == NULL) ? "NULL" : OsCurrProcessGet()->processName), + ((OsCurrTaskGet() == NULL) ? "NULL" : OsCurrTaskGet()->taskName)); } LkDprintf(fmt, ap); }