summaryrefslogtreecommitdiff
path: root/lib/server/Daemon.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-11-16 23:12:16 +0000
committerChris Wilson <chris+github@qwirx.com>2014-11-16 23:12:16 +0000
commit521c70553125b6da53c65a60e36fcc18aec36565 (patch)
treedc41c006f1c4ac7f40f98be7f1ef318c13e5d15f /lib/server/Daemon.h
parent258e57eaecfe85356181706d70141a2563d22737 (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.h8
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;