#harmony-os

hilog-sys

Rust bindings to the HiLog logging system of OpenHarmony

3 releases

0.1.2 Oct 3, 2024
0.1.1 Apr 22, 2024
0.1.0 Apr 22, 2024

#13 in #harmony-os

Download history 747/week @ 2024-07-28 680/week @ 2024-08-04 1531/week @ 2024-08-11 1012/week @ 2024-08-18 1093/week @ 2024-08-25 1002/week @ 2024-09-01 1002/week @ 2024-09-08 604/week @ 2024-09-15 698/week @ 2024-09-22 838/week @ 2024-09-29 1326/week @ 2024-10-06 907/week @ 2024-10-13 1105/week @ 2024-10-20 833/week @ 2024-10-27 939/week @ 2024-11-03 705/week @ 2024-11-10

3,690 downloads per month
Used in 3 crates

Apache-2.0

12KB
86 lines

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.


lib.rs:

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

Dependencies

~48KB