fix: 内核ERR打印,无进程和线程信息,不方便问题定位。
close: #I4DAKM Signed-off-by: zff <zhangfanfan2@huawei.com> Change-Id: I5acc8b2b632633b0717eb4186773e6cae35ea0e4
This commit is contained in:
parent
fd4b97e3f8
commit
cb423f8454
|
@ -36,6 +36,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "los_hwi.h"
|
#include "los_hwi.h"
|
||||||
#include "los_memory_pri.h"
|
#include "los_memory_pri.h"
|
||||||
|
#include "los_process_pri.h"
|
||||||
#ifdef LOSCFG_FS_VFS
|
#ifdef LOSCFG_FS_VFS
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -47,7 +48,6 @@
|
||||||
#endif
|
#endif
|
||||||
#include "los_exc_pri.h"
|
#include "los_exc_pri.h"
|
||||||
|
|
||||||
|
|
||||||
#define SIZEBUF 256
|
#define SIZEBUF 256
|
||||||
|
|
||||||
const CHAR *g_logString[] = {
|
const CHAR *g_logString[] = {
|
||||||
|
@ -278,7 +278,9 @@ VOID LOS_LkPrint(INT32 level, const CHAR *func, INT32 line, const CHAR *fmt, ...
|
||||||
}
|
}
|
||||||
|
|
||||||
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]", g_logString[level]);
|
dprintf("[%s][%s:%s]", g_logString[level],
|
||||||
|
((OsCurrProcessGet() == NULL) ? "NULL" : OsCurrProcessGet()->processName),
|
||||||
|
((OsCurrTaskGet() == NULL) ? "NULL" : OsCurrTaskGet()->taskName));
|
||||||
}
|
}
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
|
Loading…
Reference in New Issue