refactor logger: prepare for multiple write backends

This commit is contained in:
Beat Küng
2016-10-19 13:13:47 +02:00
committed by Lorenz Meier
parent 4e1a4440ca
commit ccdaabc7fb
7 changed files with 583 additions and 310 deletions
+3 -3
View File
@@ -81,7 +81,7 @@ struct LoggerSubscription {
class Logger
{
public:
Logger(size_t buffer_size, uint32_t log_interval, bool log_on_start,
Logger(LogWriter::Backend backend, size_t buffer_size, uint32_t log_interval, bool log_on_start,
bool log_until_shutdown, bool log_name_timestamp);
~Logger();
@@ -152,9 +152,9 @@ private:
*/
int check_free_space();
void start_log();
void start_log_file();
void stop_log();
void stop_log_file();
/**
* write the file header with file magic and timestamp.