Crates.io | tracing-slf4j |
lib.rs | tracing-slf4j |
version | 0.1.0 |
source | src |
created_at | 2023-06-15 20:42:32.956777 |
updated_at | 2023-06-15 20:42:32.956777 |
description | SLF4j backend compatible with Rust's tracing |
homepage | |
repository | https://github.com/MrFriendly-B-V/tracing-slf4j |
max_upload_size | |
id | 891461 |
size | 91,048 |
SLF4j backend compatible with Rust's tracing crate.
The purpose of this crate is to allow Rust programs that embed Java programs to receive logging from the Java parts, if those parts are using SLF4j.
This crate requires a Java compiler installed. the JAVA_HOME
environmental variable should be set.
When using JNI's invocation API, the JAR file embedded in this crate should be added to the classpath:
DEPENDENCIES
) to disk-Djava.class.path=<PATH TO JARFILE>
to the JVM's start parameters.After the JVM has been started, the setup register_log_fn
function should be called:
tracing_slf4j::register_log_fn(&mut env).unwrap();
This function will register the Rust logging handler with the JVM.