Skip to content

Commit bd34e08

Browse files
committed
appender: cleanup comments
1 parent 9440c3b commit bd34e08

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tracing-appender/src/rolling.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,9 @@ pub fn daily(
382382
/// The appender returned by `rolling::size` can be used with `non_blocking` to create
383383
/// a non-blocking, size based rotating appender.
384384
///
385-
/// The location of the log file will be specified the `directory` passed in.
386-
/// `file_name` specifies the complete name of the log file (no date or time is appended).
385+
/// The location of the log file will be specified by the `directory` passed in.
386+
/// `file_name` specifies the complete name of the log file.
387+
/// `RollingFileAppender` automatically appends the current date in UTC.
387388
///
388389
/// # Examples
389390
///

tracing-appender/src/rolling/builder.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,17 @@ impl Builder {
237237
}
238238
}
239239

240-
/// Limits the file size to `n` bytes on disk.
240+
/// Limits the file size to `n` bytes on disk, when using SIZE rotation.
241241
///
242242
/// # Examples
243243
///
244244
/// ```
245245
/// use tracing_appender::rolling::RollingFileAppender;
246+
/// use tracing_appender::rolling::Rotation;
246247
///
247248
/// # fn docs() {
248249
/// let appender = RollingFileAppender::builder()
250+
/// .rotation(Rotation::SIZE) // rotate log files when they reach a certain size
249251
/// .max_file_size(1024) // only the most recent 5 log files will be kept
250252
/// // ...
251253
/// .build("/var/log")

0 commit comments

Comments
 (0)