From eaf4e61f3e090880cdae9ae90de5e27f197cff91 Mon Sep 17 00:00:00 2001 From: liuyifei Date: Tue, 12 Nov 2024 01:54:20 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9tid=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuyifei --- frameworks/libhilog/hilog_printf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/libhilog/hilog_printf.cpp b/frameworks/libhilog/hilog_printf.cpp index 74a43b0..9d2727f 100644 --- a/frameworks/libhilog/hilog_printf.cpp +++ b/frameworks/libhilog/hilog_printf.cpp @@ -306,7 +306,7 @@ int HiLogPrintArgs(const LogType type, const LogLevel level, const unsigned int header.level = level; #ifndef __RECV_MSG_WITH_UCRED_ #if defined(is_ohos) && is_ohos - header.pid = static_cast(getprocpid()); + header.pid = static_cast(gettid()); #elif not defined(__WINDOWS__) header.pid = getpid(); #else -- Gitee From 3a917ffe3f22f22f7c5e35b707b495cd7fb83bad Mon Sep 17 00:00:00 2001 From: liuyifei Date: Tue, 12 Nov 2024 01:57:31 +0000 Subject: [PATCH 2/2] update frameworks/libhilog/hilog_printf.cpp. Signed-off-by: liuyifei --- frameworks/libhilog/hilog_printf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/libhilog/hilog_printf.cpp b/frameworks/libhilog/hilog_printf.cpp index 9d2727f..1e92587 100644 --- a/frameworks/libhilog/hilog_printf.cpp +++ b/frameworks/libhilog/hilog_printf.cpp @@ -306,7 +306,7 @@ int HiLogPrintArgs(const LogType type, const LogLevel level, const unsigned int header.level = level; #ifndef __RECV_MSG_WITH_UCRED_ #if defined(is_ohos) && is_ohos - header.pid = static_cast(gettid()); + header.pid = static_cast(getprocpid()); #elif not defined(__WINDOWS__) header.pid = getpid(); #else @@ -320,7 +320,7 @@ int HiLogPrintArgs(const LogType type, const LogLevel level, const unsigned int pthread_threadid_np(NULL, &tid); header.tid = static_cast(tid); #elif defined(__OHOS__) - header.tid = static_cast(getproctid()); + header.tid = static_cast(gettid()); #else header.tid = static_cast(syscall(SYS_gettid)); #endif -- Gitee