#log #logging #iot #sink #send

compressed_log

Log compression on the fly

9 releases

✓ Uses Rust 2018 edition

0.1.8 Jan 19, 2019
0.1.7 Jan 7, 2019
0.1.2 Dec 21, 2018

#55 in Compression

Download history 52/week @ 2018-12-14 54/week @ 2018-12-21 3/week @ 2018-12-28 148/week @ 2019-01-04 50/week @ 2019-01-11 325/week @ 2019-01-18 218/week @ 2019-01-25 260/week @ 2019-02-01

113 downloads per month

Custom license

17KB
391 lines

compressed_log

A Rust crate to compress logs on the fly, and send them over the network after reaching a configured threshold.

Features

  • Uses log API
  • LZ4 to compress log on the fly
  • Transmits compressed data over persistent WebSocket connection
  • Configurable threshold which will trigger in-memory log rotation and data transmission.

WIP.

Example

Check out examples folder for more examples.

WIP.

Client:

let level = Level::Info;
let logger = LoggerBuilder::new()
    .set_level(level)
    .set_compression_level(Compression::Slow)
    .set_sink_url("http://127.0.0.1:8000/sink/")
    .build()?;
log::set_boxed_logger(Box::new(logger))?;
log::set_max_level(level.to_level_filter());

Server:

WIP.

By default compressed_log expects WebSocket endpoint to understand binary messages that contains data compressed with LZ4.

Dependencies

~19MB
~361K SLoC