diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-11-16 23:12:16 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-11-16 23:12:16 +0000 |
commit | 521c70553125b6da53c65a60e36fcc18aec36565 (patch) | |
tree | dc41c006f1c4ac7f40f98be7f1ef318c13e5d15f /lib/server/Daemon.h | |
parent | 258e57eaecfe85356181706d70141a2563d22737 (diff) |
Add option to truncate log file at start of every backup.
Prevents backup log files from becoming too large.
Diffstat (limited to 'lib/server/Daemon.h')
-rw-r--r-- | lib/server/Daemon.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/server/Daemon.h b/lib/server/Daemon.h index 923053c6..d95ac0c8 100644 --- a/lib/server/Daemon.h +++ b/lib/server/Daemon.h @@ -85,7 +85,13 @@ protected: bool IsSingleProcess() { return mSingleProcess; } virtual std::string GetOptionString(); virtual int ProcessOption(signed int option); - + void ResetLogFile() + { + mapLogFileLogger.reset( + new FileLogger(mLogFile, mLogFileLevel, + !mLogLevel.mTruncateLogFile)); + } + private: static void SignalHandler(int sigraised); box_time_t GetConfigFileModifiedTime() const; |