#harmony-os #open-harmony #logging

hilog-sys

Rust bindings to the HiLog logging system of OpenHarmony

5 releases

0.1.4 Jan 9, 2025
0.1.3 Jan 4, 2025
0.1.2 Oct 3, 2024
0.1.1 Apr 22, 2024
0.1.0 Apr 22, 2024

#1072 in Debugging

Download history 1763/week @ 2025-02-03 1268/week @ 2025-02-10 1588/week @ 2025-02-17 1887/week @ 2025-02-24 1435/week @ 2025-03-03 1328/week @ 2025-03-10 1477/week @ 2025-03-17 1757/week @ 2025-03-24 1386/week @ 2025-03-31 1467/week @ 2025-04-07 1520/week @ 2025-04-14 1395/week @ 2025-04-21 1689/week @ 2025-04-28 1655/week @ 2025-05-05 1244/week @ 2025-05-12 1244/week @ 2025-05-19

5,977 downloads per month
Used in 19 crates (4 directly)

Apache-2.0

12KB
77 lines

hilog-sys

Rust bindings for the HiLog logging framework of OpenHarmony. This crate should only be used on OpenHarmony (target_env = "ohos"). More information on hilog in native applications is available in the hilog native guidelines. You can use the hdc tools [hilog command-line interface] to query the saved logs.

Safety

When using OH_LOG_Print from Rust you must ensure that the fmt parameter either

  • Does not contain any printf style format specifiers (like %s, %d) OR
  • fmt is "${public}s\0" and the actual string is passed as the following parameter.

Crate Features

  • log: When the log feature is enabled, a From<log::Level> implementation is added to easily convert from logs log level to HiLogs log level.

Feature flags


hilog-sys

Rust bindings for the HiLog logging framework of OpenHarmony. This crate should only be used on OpenHarmony (target_env = "ohos"). The official C-API documentation is available on gitee.

License

These bindings are licensed under the Apache 2.0 license, matching the license of HiLog.

Dependencies

~49KB