Improve network usage for small text changes #166
1 changed files with 2 additions and 1 deletions
Lint
commit
3818da288a
|
|
@ -96,7 +96,8 @@ impl RotatingFileWriter {
|
||||||
fn open_or_create_log_file(inner: &mut RotatingFileWriterInner) -> io::Result<()> {
|
fn open_or_create_log_file(inner: &mut RotatingFileWriterInner) -> io::Result<()> {
|
||||||
// If we haven't reached rotation time and there's an existing log file, reuse it
|
// If we haven't reached rotation time and there's an existing log file, reuse it
|
||||||
if !Self::should_rotate(inner)
|
if !Self::should_rotate(inner)
|
||||||
&& let Some(latest_file) = Self::find_latest_log_file(&inner.directory, &inner.file_prefix)
|
&& let Some(latest_file) =
|
||||||
|
Self::find_latest_log_file(&inner.directory, &inner.file_prefix)
|
||||||
{
|
{
|
||||||
let filepath = inner.directory.join(&latest_file);
|
let filepath = inner.directory.join(&latest_file);
|
||||||
let file = OpenOptions::new()
|
let file = OpenOptions::new()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue