Skip to content

v1.6.1

Compare
Choose a tag to compare
@zhuxiujia zhuxiujia released this 09 Aug 02:43
· 116 commits to master since this release

fast_log v1.6.1 Release Notes

Main Updates

  • Added zero-copy mmap file logging for better performance under high load.

  • Introduced MmapFile struct to implement mmap file logging. It implements the FilePlugin interface.

  • Users can configure MmapFile for mmap logging via the split option:

Need to enable features = ["mmap"] in Cargo.toml to use mmap.

split::<MmapFile, LogPacker>(
    "target/logs/mmap.log",
    LogSize::MB(10),
    RollingType::Size,
    LogPacker{}, 
)
  • MmapFile supports rolling files by size or time.

  • Standard file logging still available, both can be used together.

  • Optimized performance and resource usage of logging.

Usage Notes

  • Require Rust 1.70 or above.

  • Need to enable features = ["mmap"] in Cargo.toml to use mmap.

  • MmapFile works on Linux, Windows, OSX etc.

  • Avoid too large file size when rolling by size to limit memory use.

  • Still use standard IO to read logs, mmap reading not recommended.

Full Changelog

  • feat: add mmap file logging
  • feat: new MmapFile struct
  • docs: update docs and examples
  • refactor: optimize core logging path
  • test: more tests
  • chore: upgrade dependencies etc.

Feel free to ask questions, report issues or suggest improvements!