Crate ezlog

source ·
Expand description

ezlog is a high efficiency cross-platform logging library.

It is inspired by Xlog and Loagan, rewrite in Rust.

Guide level documentation is found on the website.

Features

  • multi platform: Flutter, Android, iOS, Windows, Linux, MacOS
  • map file into memory by mmap.
  • compression support, eg: zlib.
  • encryption support, eg: AEAD encryption.
  • fetch log by callback.
  • trim out of date files.
  • command line parser support.

example

use ezlog::EZLogConfigBuilder;
use ezlog::Level;
use log::trace;


ezlog::InitBuilder::new().debug(true).init();

let config: ezlog::EZLogConfig = EZLogConfigBuilder::new()
    .level(Level::Trace)
    .dir_path(
        dirs::cache_dir()
            .unwrap()
            .into_os_string()
            .into_string()
            .expect("dir path error"),
    )
    .build();
ezlog::create_log(config);

trace!("hello ezlog");

Structs

Enums

Constants

Traits

Functions