(&mut self, buf: &[u8])
| 66 | |
| 67 | impl Write for LogFileWriterInner { |
| 68 | fn write(&mut self, buf: &[u8]) -> io::Result<usize> { |
| 69 | self.update_file_if_necessary()?; |
| 70 | if let Some(file) = self.writer.as_mut() { |
| 71 | file.write_all(buf)?; |
| 72 | } |
| 73 | // Always returns OK whatever the FileLogger is enabled or not. |
| 74 | Ok(buf.len()) |
| 75 | } |
| 76 | |
| 77 | fn flush(&mut self) -> io::Result<()> { |
| 78 | self.update_file_if_necessary()?; |