slog2
A crate that wraps methods defined in libslog2 in an idomatic rust interface. Also exposes all unsafe c ffi functions via a ffi module.
libslog2 is used to to register and write to logging buffers via the slogger2 system logger daemon.
Usage
Add this to your Cargo.toml:
[]
= "0.1"
Example
For more examples examples for how to use this crate.
Register a simple logger buffer:
// Create config
let mut config = default;
config.buffer_set_name?;
config.buffer_name?;
config.set_num_pages;
// Register and get handle.
let = config.register?;
// Pass handle as buffer.
info!;
info!;
Set a default buffer:
// Set a default buffer.
set_default_buffer;
// Omitting the buffer argument will use the default buffer.
info!;
info!;
Target Support
This crate was tested for targets aarch64-unknown-nto-qnx800, x86_64-pc-nto-qnx800 with the rustc that is shipped in the qnxsoftwarecenter.