You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
2 years ago | |
|---|---|---|
| .. | ||
| patches | 2 years ago | |
| src | 2 years ago | |
| Android.bp | 2 years ago | |
| Cargo.toml | 2 years ago | |
| LICENSE | 2 years ago | |
| METADATA | 2 years ago | |
| MODULE_LICENSE_MIT | 2 years ago | |
| OWNERS | 2 years ago | |
| README.md | 2 years ago | |
| TEST_MAPPING | 2 years ago | |
| cargo2android.json | 2 years ago | |
README.md
Kernel logger for Rust
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.
Usage
[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.