1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
rotating_file_sink(std::string base_filename, std::size_t max_size, std::size_t max_files, bool rotate_on_open = false) : base_filename_(std::move(base_filename)), max_size_(max_size), max_files_(max_files) { file_helper_.open(calc_filename(base_filename_, 0)); current_size_ = file_helper_.size(); if (rotate_on_open && current_size_ > 0) { rotate_(); } }
|