commit | ee4e0c64cc3e4a1eacfe1db9ecfb8550ca6e10d4 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Tue Oct 08 15:30:21 2024 +0000 |
committer | James Farrell <[email protected]> | Tue Oct 08 15:30:21 2024 +0000 |
tree | 315ddb0cd659c207b7efd860c3ec4ef69d095cd9 | |
parent | 88722bc5a1312381aa36b0589dd6013d3db7c510 [diff] |
Add patch for LICENSE and make Cargo.toml match the crate archive. Bug: http://b/339424309 Test: treehugger Change-Id: I4bdd8fb0d3c43d97cd87a183e73390791a6f8cb4
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.