From bc51469a5b12087858f328660e222afc3ae057fc Mon Sep 17 00:00:00 2001 From: liuyifei Date: Tue, 13 May 2025 03:29:31 +0000 Subject: [PATCH 1/3] add interface Signed-off-by: liuyifei --- frameworks/libhilog/base/hilog_base.c | 5 +++++ interfaces/native/innerkits/include/hilog_base/log_base.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/frameworks/libhilog/base/hilog_base.c b/frameworks/libhilog/base/hilog_base.c index c482e9c..e78bc30 100644 --- a/frameworks/libhilog/base/hilog_base.c +++ b/frameworks/libhilog/base/hilog_base.c @@ -118,3 +118,8 @@ bool HiLogBaseIsLoggable(unsigned int domain, const char *tag, LogLevel level) } return true; } + +void HiLogRecordSnapshot(int lines, int64_t time) +{ + return; +} diff --git a/interfaces/native/innerkits/include/hilog_base/log_base.h b/interfaces/native/innerkits/include/hilog_base/log_base.h index 836bca9..63cc6cf 100644 --- a/interfaces/native/innerkits/include/hilog_base/log_base.h +++ b/interfaces/native/innerkits/include/hilog_base/log_base.h @@ -18,6 +18,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { @@ -107,6 +108,8 @@ int HiLogBasePrint(LogType type, LogLevel level, unsigned int domain, const char */ bool HiLogBaseIsLoggable(unsigned int domain, const char *tag, LogLevel level); +void HiLogRecordSnapshot(int lines, int64_t time); + #ifdef __cplusplus } #endif -- Gitee From fcc8902fb213b040c952dc981fe9afe9dafcc389 Mon Sep 17 00:00:00 2001 From: liuyifei Date: Wed, 21 May 2025 10:28:54 +0000 Subject: [PATCH 2/3] update frameworks/libhilog/base/hilog_base.c. Signed-off-by: liuyifei --- frameworks/libhilog/base/hilog_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/libhilog/base/hilog_base.c b/frameworks/libhilog/base/hilog_base.c index e78bc30..bcd683e 100644 --- a/frameworks/libhilog/base/hilog_base.c +++ b/frameworks/libhilog/base/hilog_base.c @@ -119,7 +119,7 @@ bool HiLogBaseIsLoggable(unsigned int domain, const char *tag, LogLevel level) return true; } -void HiLogRecordSnapshot(int lines, int64_t time) +int HiLogRecordSnapshot(uint32_t lines, int64_t time) { - return; + return 0; } -- Gitee From 2d6a9ad84098ec4edf102b9206d22bc6cb331d3e Mon Sep 17 00:00:00 2001 From: liuyifei Date: Wed, 21 May 2025 10:29:43 +0000 Subject: [PATCH 3/3] update interfaces/native/innerkits/include/hilog_base/log_base.h. Signed-off-by: liuyifei --- interfaces/native/innerkits/include/hilog_base/log_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/native/innerkits/include/hilog_base/log_base.h b/interfaces/native/innerkits/include/hilog_base/log_base.h index 63cc6cf..380675e 100644 --- a/interfaces/native/innerkits/include/hilog_base/log_base.h +++ b/interfaces/native/innerkits/include/hilog_base/log_base.h @@ -108,7 +108,7 @@ int HiLogBasePrint(LogType type, LogLevel level, unsigned int domain, const char */ bool HiLogBaseIsLoggable(unsigned int domain, const char *tag, LogLevel level); -void HiLogRecordSnapshot(int lines, int64_t time); +int HiLogRecordSnapshot(uint32_t lines, int64_t time); #ifdef __cplusplus } -- Gitee