#ifndef LOG_H #define LOG_H #include #include #include class Log { std::ostream log_file; std::fstream log_file_s; public: explicit Log(std::string file_name, int max_size); explicit Log(int *other); ~Log(); Log(const Log &other); void copyFromOther(const Log &other); bool isOpen(); std::ostream& rdbuf(); Log& operator<<(std::filesystem::path p); Log& operator<<(std::ostream&(*f)(std::ostream&)); template Log &operator<<(T t) { log_file << t; std::cout << t; return *this; } template Log &operator<<(const T *t) { log_file << t; std::cout << t; return *this; } template Log &operator<<(T *t) { log_file << t; std::cout << t; return *this; } }; #endif // LOG_H