ndk-logger

Crates.iondk-logger
lib.rsndk-logger
version0.0.2
sourcesrc
created_at2018-01-18 02:59:07.798744
updated_at2018-01-25 10:31:28.930068
descriptionA library bridging [log](https://crates.io/crates/log) message to [Android NDK log](https://developer.android.com/ndk/reference/log_8h.html).
homepagehttps://github.com/jarod/ndk-logger
repositoryhttps://github.com/jarod/ndk-logger
max_upload_size
id47253
size3,989
Jarod Liu (jarod)

documentation

https://docs.rs/ndk-logger/

README

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();
}
Commit count: 3

cargo fmt