Skip to content

Commit

Permalink
Changed no_basename() to suppress_basename() in FileSpec for consiste…
Browse files Browse the repository at this point in the history
…ncy with suppress_timestamp()
  • Loading branch information
Krystian Wiecheć committed Jan 13, 2024
1 parent 36f84ad commit 9a5defc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/file_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ impl FileSpec {
}
}

/// Excludes the basename from the log filename.
/// Makes the logger not include a basename into the names of the log files
///
/// Equivalent to `basename("")`.
#[must_use]
pub fn no_basename(mut self) -> Self {
pub fn suppress_basename(mut self) -> Self {
self.basename = "".into();
self
}
Expand Down
4 changes: 2 additions & 2 deletions tests/test_file_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ fn work(value: u8) {
logger = logger.format(opt_format).log_to_file(
FileSpec::default()
.directory(self::test_utils::dir())
.no_basename(),
.suppress_basename(),
);
}
7 => {
logger = logger.format(opt_format).log_to_file(
FileSpec::default()
.directory(self::test_utils::dir())
.no_basename()
.suppress_basename()
.discriminant("foo"),
);
}
Expand Down

0 comments on commit 9a5defc

Please sign in to comment.