You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: file_output.rs
    path of file: ./repos/flowgger/src/flowgger/output
    
    the code of the file until where you have to start completion: use super::Output;
use crate::flowgger::config::Config;
use crate::flowgger::merger::Merger;
use crate::flowgger::utils::rotating_file::RotatingFile;
use crate::flowgger::validate_time_format_input;
use std::io::{BufWriter, Write};
use std::sync::mpsc::Receiver;
use std::sync::{Arc, Mutex};
use std::thread;

use std::io::stderr;
const FILE_DEFAULT_BUFFER_SIZE: usize = 0;
const FILE_DEFAULT_TIME_FORMAT: &str = "[year][month][day]T[hour][minute][second]Z";
const FILE_DEFAULT_ROTATION_SIZE: usize = 0;
const FILE_DEFAULT_ROTATION_TIME: u32 = 0;
const FILE_DEFAULT_ROTATION_MAXFILES: i32 = 50;

/// Output of type file, to store the data to a file
pub struct FileOutput {
    path: String,
    buffer_size: usize,
    rotation_size: usize,
    rotation_time: u32,
    rotation_maxfiles: i32,
    time_format: String,
}

impl FileOutput {
    /// Create
    
    fn test_log_norotate_buf() -> Result<()> {
        let test_object = WriterTest::new("test_log_norotate_buf")?;
        let cfg = Config::from_string(&format!(
            "[output]\nfile_path = \"{}\"\nfile_buffer_size=10\n",
            test_object.get_file_base()
        ))
        .unwrap();
        let mut writer = test_object.setup_writer(
            cfg,
            FILE_DEFAULT_ROTATION_SIZE,
            FILE_DEFAULT_ROTATION_MAXFILES,
            10,
            FILE_DEFAULT_ROTATION_TIME,
        );

        // We should have a BufWriter<File> instance. First write should not be flushed
        let _ = writer.write(test_object.test_patterns[0].as_bytes());
        assert_eq!(fs::read_to_string(test_object.get_file_base()).unwrap(), "");
        let _ = writer.write(test_object.test_patterns[1].as_bytes());
        assert_eq!(
            fs::read_to_string(test_object.get_file_base()).unwrap(),
            test_object.test_patterns[0]
        );

        Ok(())
    }