commit | a1fcb0f9931a106ed4bc6d3c54bc2978d80a6c89 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Tue May 21 15:04:18 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue May 21 15:04:18 2024 +0000 |
tree | e7b125fe5fbd0c4a96f085972862866d8a7bf87d | |
parent | 06d59259cf7f7f3bbed4597983ea56fe1cbf4e67 [diff] | |
parent | ff490bf93e9672aecee972b926da789cc5278463 [diff] |
Update Android.bp by running cargo_embargo am: aba8833ddd am: ff490bf93e Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/kernlog/+/3095428 Change-Id: I2faa473297b4e867efac07e2089e175bdecdc95e Signed-off-by: Automerger Merge Worker <[email protected]>
Logger implementation for low level kernel log (using /dev/kmsg
)
Usually intended for low level implementations, like systemd generators, which have to use /dev/kmsg
:
Since syslog is not available (see above) write log messages to /dev/kmsg instead.
[dependencies] log = "0.4" kernlog = "0.3"
#[macro_use] extern crate log; extern crate kernlog; fn main() { kernlog::init().unwrap(); warn!("something strange happened"); }
Note you have to have permissions to write to /dev/kmsg
, which normal users (not root) usually don't.