diff --git a/interfaces/ets/ani/hilog/ets/@ohos.hilog.ets b/interfaces/ets/ani/hilog/ets/@ohos.hilog.ets index eb237b69b0e0ade8c1f4b37ef9ee4003d7d298fe..f6bcbceefb0f783fc5b22b48fb84801aedc67429 100644 --- a/interfaces/ets/ani/hilog/ets/@ohos.hilog.ets +++ b/interfaces/ets/ani/hilog/ets/@ohos.hilog.ets @@ -16,22 +16,22 @@ export default namespace hilog { loadLibrary("hilog_ani"); - export native function debug(domain: number, tag: string, format: string, - ...args: (int|boolean|number|string|bigint|Object|undefined|null)[]): void; + export native function debug(domain: int, tag: string, format: string, + ...args: (Object|undefined|null)[]): void; - export native function info(domain: number, tag: string, format: string, - ...args: (int|boolean|number|string|bigint|Object|undefined|null)[]): void; + export native function info(domain: int, tag: string, format: string, + ...args: (Object|undefined|null)[]): void; - export native function warn(domain: number, tag: string, format: string, - ...args: (int|boolean|number|string|bigint|Object|undefined|null)[]): void; + export native function warn(domain: int, tag: string, format: string, + ...args: (Object|undefined|null)[]): void; - export native function error(domain: number, tag: string, format: string, - ...args: (int|boolean|number|string|bigint|Object|undefined|null)[]): void; + export native function error(domain: int, tag: string, format: string, + ...args: (Object|undefined|null)[]): void; - export native function fatal(domain: number, tag: string, format: string, - ...args: (int|boolean|number|string|bigint|Object|undefined|null)[]): void; + export native function fatal(domain: int, tag: string, format: string, + ...args: (Object|undefined|null)[]): void; - export native function isLoggable(domain: number, tag: string, level: LogLevel): boolean; + export native function isLoggable(domain: int, tag: string, level: LogLevel): boolean; export native function setMinLogLevel(level: LogLevel): void; diff --git a/interfaces/ets/ani/hilog/include/hilog_ani_base.h b/interfaces/ets/ani/hilog/include/hilog_ani_base.h index 89445c604e5fbbeb7dc8e0e1a2b4ae3a5b85232f..1c7a676e3c1bf9066dd4fe2d2451b5f5d460b0b7 100644 --- a/interfaces/ets/ani/hilog/include/hilog_ani_base.h +++ b/interfaces/ets/ani/hilog/include/hilog_ani_base.h @@ -33,14 +33,14 @@ typedef struct { class HilogAniBase { public: - static void Debug(ani_env *env, ani_double domain, ani_string tag, ani_string format, ani_array args); - static void HilogImpl(ani_env *env, ani_double domain, ani_string tag, ani_string format, ani_array args, + static void Debug(ani_env *env, ani_int domain, ani_string tag, ani_string format, ani_array args); + static void HilogImpl(ani_env *env, ani_int domain, ani_string tag, ani_string format, ani_array args, int level, bool isAppLog); - static void Info(ani_env *env, ani_double domain, ani_string tag, ani_string format, ani_array args); - static void Warn(ani_env *env, ani_double domain, ani_string tag, ani_string format, ani_array args); - static void Error(ani_env *env, ani_double domain, ani_string tag, ani_string format, ani_array args); - static void Fatal(ani_env *env, ani_double domain, ani_string tag, ani_string format, ani_array args); - static ani_boolean IsLoggable(ani_env *env, ani_double domain, ani_string tag, ani_enum_item level); + static void Info(ani_env *env, ani_int domain, ani_string tag, ani_string format, ani_array args); + static void Warn(ani_env *env, ani_int domain, ani_string tag, ani_string format, ani_array args); + static void Error(ani_env *env, ani_int domain, ani_string tag, ani_string format, ani_array args); + static void Fatal(ani_env *env, ani_int domain, ani_string tag, ani_string format, ani_array args); + static ani_boolean IsLoggable(ani_env *env, ani_int domain, ani_string tag, ani_enum_item level); static void SetMinLogLevel(ani_env *env, ani_enum_item level); private: diff --git a/interfaces/ets/ani/hilog/src/hilog_ani_base.cpp b/interfaces/ets/ani/hilog/src/hilog_ani_base.cpp index e4730236bae37ef95b2731c88afebf5483cd35e3..bd5ef6f1deffe6babfe476301416e66b66b84b69 100644 --- a/interfaces/ets/ani/hilog/src/hilog_ani_base.cpp +++ b/interfaces/ets/ani/hilog/src/hilog_ani_base.cpp @@ -130,7 +130,7 @@ void ParseLogContent(std::string& formatStr, std::vector& params, std: return; } -void HilogAniBase::HilogImpl(ani_env *env, ani_double domain, ani_string tag, +void HilogAniBase::HilogImpl(ani_env *env, ani_int domain, ani_string tag, ani_string format, ani_array args, int level, bool isAppLog) { int32_t domainVal = static_cast(domain); @@ -180,37 +180,37 @@ void HilogAniBase::parseAniValue(ani_env *env, ani_ref element, std::vector(domain);