ndk-logger 0.0.2

A library bridging [log](https://crates.io/crates/log) message to [Android NDK log](https://developer.android.com/ndk/reference/log_8h.html).
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 3 items with examples
  • Size
  • Source code size: 3.84 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 258.49 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • jarod/ndk-logger
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jarod

A library bridging log message to Android NDK log.

Usage

Cargo.toml

[target.'cfg(target_os="android")'.dependencies]
ndk-logger = "*"

Rust entry

#[macro_use]
extern crate log;
#[cfg(target_os="android")]
extern crate ndk_logger;

#[cfg(target_os="android")]
fn init_logger() {
    ndk_logger::init().unwrap();
}
#[cfg(not(target_os="android"))]
fn init_logger() {
    // init logger for other platform
}

fn main() {
    init_logger();
}