yutannihilation / savvy

A simple R extension interface using Rust
https://yutannihilation.github.io/savvy/guide/
MIT License
70 stars 4 forks source link

Logging #237

Closed yutannihilation closed 5 months ago

yutannihilation commented 5 months ago
use savvy::savvy_init;
use savvy_ffi::DllInfo;

#[savvy_init]
fn init_logger(dll_info: *mut DllInfo) -> savvy::Result<()> {
    savvy::log::env_logger().init();
    Ok(())
}
x <- altint()
c(x)
#> [DEBUG savvy::altrep::altinteger] A MyAltInt object is materialized
#> [1] 1 2 3