File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -382,8 +382,9 @@ pub fn daily(
382
382
/// The appender returned by `rolling::size` can be used with `non_blocking` to create
383
383
/// a non-blocking, size based rotating appender.
384
384
///
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.
387
388
///
388
389
/// # Examples
389
390
///
Original file line number Diff line number Diff line change @@ -237,15 +237,17 @@ impl Builder {
237
237
}
238
238
}
239
239
240
- /// Limits the file size to `n` bytes on disk.
240
+ /// Limits the file size to `n` bytes on disk, when using SIZE rotation .
241
241
///
242
242
/// # Examples
243
243
///
244
244
/// ```
245
245
/// use tracing_appender::rolling::RollingFileAppender;
246
+ /// use tracing_appender::rolling::Rotation;
246
247
///
247
248
/// # fn docs() {
248
249
/// let appender = RollingFileAppender::builder()
250
+ /// .rotation(Rotation::SIZE) // rotate log files when they reach a certain size
249
251
/// .max_file_size(1024) // only the most recent 5 log files will be kept
250
252
/// // ...
251
253
/// .build("/var/log")
You can’t perform that action at this time.
0 commit comments