Skip to content

Commit

Permalink
appender: add suffix parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
IceSentry committed Jul 17, 2022
1 parent 968dd0d commit 089dc7f
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 40 deletions.
6 changes: 3 additions & 3 deletions tracing-appender/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
//!
//! ```rust
//! # fn docs() {
//! let file_appender = tracing_appender::rolling::hourly("/some/directory", "prefix.log");
//! let file_appender = tracing_appender::rolling::hourly("/some/directory", "prefix", "log");
//! # }
//! ```
//! This creates an hourly rotating file appender that writes to `/some/directory/prefix.log.YYYY-MM-DD-HH`.
//! This creates an hourly rotating file appender that writes to `/some/directory/prefix.YYYY-MM-DD-HH.log`.
//! [`Rotation::DAILY`](rolling::Rotation::DAILY) and [`Rotation::NEVER`](rolling::Rotation::NEVER) are the other available options.
//!
//! The file appender implements [`std::io::Write`][write]. To be used with [`tracing_subscriber::FmtSubscriber`][fmt_subscriber],
Expand Down Expand Up @@ -99,7 +99,7 @@
//!
//! ```rust
//! # fn docs() {
//! let file_appender = tracing_appender::rolling::hourly("/some/directory", "prefix.log");
//! let file_appender = tracing_appender::rolling::hourly("/some/directory", "prefix", "log");
//! let (non_blocking, _guard) = tracing_appender::non_blocking(file_appender);
//! tracing_subscriber::fmt()
//! .with_writer(non_blocking)
Expand Down
Loading

0 comments on commit 089dc7f

Please sign in to comment.