| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| patches/ | 04-Jul-2025 | - | 94 | 84 | ||
| src/ | 04-Jul-2025 | - | 194 | 118 | ||
| .android-checksum.json | D | 04-Jul-2025 | 1 KiB | 1 | 1 | |
| .cargo-checksum.json | D | 04-Jul-2025 | 327 | 1 | 1 | |
| Android.bp | D | 04-Jul-2025 | 897 | 36 | 32 | |
| Cargo.toml | D | 04-Jul-2025 | 1,023 | 30 | 27 | |
| LICENSE | D | 04-Jul-2025 | 1.1 KiB | 22 | 17 | |
| METADATA | D | 04-Jul-2025 | 403 | 18 | 17 | |
| MODULE_LICENSE_MIT | D | 04-Jul-2025 | 0 | |||
| README.md | D | 04-Jul-2025 | 756 | 36 | 25 | |
| TEST_MAPPING | D | 04-Jul-2025 | 177 | 9 | 8 | |
| cargo_embargo.json | D | 04-Jul-2025 | 51 | 4 | 4 |
README.md
1# Kernel logger for Rust 2 3Logger implementation for low level kernel log (using `/dev/kmsg`) 4 5Usually intended for low level implementations, like [systemd generators][1], 6which have to use `/dev/kmsg`: 7 8> Since syslog is not available (see above) write log messages to /dev/kmsg instead. 9 10[Full documentation.][2] 11 12[1]: http://www.freedesktop.org/wiki/Software/systemd/Generators/ 13[2]: http://kstep.me/kernlog.rs/kernlog/index.html 14 15## Usage 16 17```toml 18[dependencies] 19log = "0.4" 20kernlog = "0.3" 21``` 22 23```rust 24#[macro_use] 25extern crate log; 26extern crate kernlog; 27 28fn main() { 29 kernlog::init().unwrap(); 30 warn!("something strange happened"); 31} 32``` 33 34Note you have to have permissions to write to `/dev/kmsg`, 35which normal users (not root) usually don't. 36