Documentation

log_init

#![feature(doc_auto_cfg)]
#![feature(doc_cfg)]

mod kv;
use kv::Kv;
pub mod layout;
use workspace_root::get_workspace_root;

#[static_init::dynamic]
pub static ROOT: String = get_workspace_root().to_str().unwrap().to_owned();

#[static_init::dynamic]
pub static HOME_DIR: String = dirs::home_dir().unwrap().to_str().unwrap().to_owned();

pub fn init() {
  use logforth::append;
  logforth::builder()
    .dispatch(|d| {
      #[cfg(feature = "stdout")]
      d.append(append::Stdout::default().with_layout(layout::Text::default()))
    })
    .apply();
}

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。