Skip to content

Commit

Permalink
Fix readme examples to include compression
Browse files Browse the repository at this point in the history
  • Loading branch information
kstrafe committed Jun 8, 2023
1 parent 08b2a43 commit 3acb684
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "file-rotate"
version = "0.7.4"
version = "0.7.5"
authors = ["Kevin Robert Stravers <[email protected]>", "Erlend Langseth <[email protected]>"]
edition = "2018"
description = "Log rotation for files"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Following are some supplementary examples to get started.
## Basic example

```rust
use file_rotate::{FileRotate, ContentLimit, suffix::AppendCount};
use file_rotate::{FileRotate, ContentLimit, compression::Compression, suffix::AppendCount};
use std::{fs, io::Write, path::PathBuf};

fn main() {
let mut log = FileRotate::new("logs/log", AppendCount::new(2), ContentLimit::Lines(3), None);
let mut log = FileRotate::new("logs/log", AppendCount::new(2), ContentLimit::Lines(3), Compression::None, None);

// Write a bunch of lines
writeln!(log, "Line 1: Hello World!");
Expand Down Expand Up @@ -51,6 +51,7 @@ let mut log = FileRotate::new(
"logs/log",
AppendTimestamp::default(FileLimit::MaxFiles(3)),
ContentLimit::Lines(3),
Compression::None,
None,
);

Expand Down Expand Up @@ -95,4 +96,3 @@ This project is licensed under the [MIT license].
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in file-rotate by you, shall be licensed as MIT, without any additional
terms or conditions.

0 comments on commit 3acb684

Please sign in to comment.