diff --git a/frameworks/include/hilog_inner.h b/frameworks/include/hilog_inner.h index b653d69519e03c5e9da41ccb55641eac07d5179c..f0892128556b92897d6130765a76156a2a656d0c 100644 --- a/frameworks/include/hilog_inner.h +++ b/frameworks/include/hilog_inner.h @@ -24,6 +24,10 @@ extern "C" { int HiLogPrintArgs(const LogType type, const LogLevel level, const unsigned int domain, const char *tag, const char *fmt, va_list ap); +int HiLogPrintDictNew(const LogType type, const LogLevel level, const unsigned int domain, const char *tag, + const unsigned int, const unsigned int, const char *fmt, ...); +int HiLogPrintComm(const LogLevel level, const unsigned int domain, const char *tag, + const unsigned int, const unsigned int, const char *fmt, ...); #ifdef __cplusplus } diff --git a/frameworks/libhilog/hilog_printf.cpp b/frameworks/libhilog/hilog_printf.cpp index 4a7cb652d694eadf1956b86551e75ecd06c02e2b..5ed98430e97f6fab4dedd8d5fe89ac9bc378cb32 100644 --- a/frameworks/libhilog/hilog_printf.cpp +++ b/frameworks/libhilog/hilog_printf.cpp @@ -242,6 +242,28 @@ bool HiLogIsPrivacyOn() return priv; } +int HiLogPrintDictNew(const LogType type, const LogLevel level, const unsigned int domain, const char *tag, + const unsigned int, const unsigned int, const char *fmt, ...) +{ + int ret; + va_list ap; + va_start(ap, fmt); + ret = HiLogPrintArgs(type, level, domain, tag, fmt, ap); + va_end(ap); + return ret; +} + +int HiLogPrintComm(const LogLevel level, const unsigned int domain, const char *tag, + const unsigned int, const unsigned int, const char *fmt, ...) +{ + int ret; + va_list ap; + va_start(ap, fmt); + ret = HiLogPrintArgs(LOG_CORE, level, domain, tag, fmt, ap); + va_end(ap); + return ret; +} + int HiLogPrintArgs(const LogType type, const LogLevel level, const unsigned int domain, const char *tag, const char *fmt, va_list ap) { diff --git a/interfaces/native/innerkits/libhilog.map b/interfaces/native/innerkits/libhilog.map index 55d0fdead79f47f5048b5fbcc4f885185c207c27..0d47486565d59fc678ff4403cd7be95f9a604052 100644 --- a/interfaces/native/innerkits/libhilog.map +++ b/interfaces/native/innerkits/libhilog.map @@ -14,6 +14,8 @@ LOG_SetCallback; HiLogSetAppMinLogLevel; HiLogSetAppLogLevel; + HiLogPrintDictNew; + HiLogPrintComm; }; extern "C++" { "OHOS::HiviewDFX::HiLog::Info(OHOS::HiviewDFX::HiLogLabel const&, char const*, ...)";