提交 f88608e5 编写于 作者: O openharmony_ci 提交者: Gitee

!722 内核ERR打印,无进程和线程信息,不方便问题定位

Merge pull request !722 from zhangfanfan2/other3
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#endif #endif
#include "los_init.h" #include "los_init.h"
#include "los_printf_pri.h" #include "los_printf_pri.h"
#include "los_process_pri.h"
#ifdef LOSCFG_SHELL_LK #ifdef LOSCFG_SHELL_LK
...@@ -189,7 +190,9 @@ VOID OsLkDefaultFunc(INT32 level, const CHAR *func, INT32 line, const CHAR *fmt, ...@@ -189,7 +190,9 @@ VOID OsLkDefaultFunc(INT32 level, const CHAR *func, INT32 line, const CHAR *fmt,
return; return;
} }
if ((level != LOS_COMMON_LEVEL) && ((level > LOS_EMG_LEVEL) && (level <= LOS_TRACE_LEVEL))) { 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); LkDprintf(fmt, ap);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册