diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-09-29 20:39:56 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-09-29 20:41:41 +0200 |
commit | f438a7bc612e94bfcd1ef2b61a7d5b61ce2eaaa6 (patch) | |
tree | e4be8a023eaecc238c72f2eca9f3883816151863 /src/account-server/main-account.cpp | |
parent | 992cd35b0d1c0e6a6bc543960d6d6720b5429e89 (diff) | |
download | manaserv-f438a7bc612e94bfcd1ef2b61a7d5b61ce2eaaa6.tar.gz manaserv-f438a7bc612e94bfcd1ef2b61a7d5b61ce2eaaa6.tar.bz2 manaserv-f438a7bc612e94bfcd1ef2b61a7d5b61ce2eaaa6.tar.xz manaserv-f438a7bc612e94bfcd1ef2b61a7d5b61ce2eaaa6.zip |
Add log file rotation support based on ExceptionFault's work.
This patch adds options to enable log rotations
base on files size and or change of date.
Note: Zip support will be added in a second commit.
Reviewed-by: CodyMartin, Thorbjorn.
Diffstat (limited to 'src/account-server/main-account.cpp')
-rw-r--r-- | src/account-server/main-account.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/account-server/main-account.cpp b/src/account-server/main-account.cpp index 23332362..159df4c6 100644 --- a/src/account-server/main-account.cpp +++ b/src/account-server/main-account.cpp @@ -160,6 +160,16 @@ static void initialize() LOG_INFO("Using statistics file: " << statisticsFile); + // Set up the options related to log rotation. + Logger::enableLogRotation(Configuration::getBoolValue("log_enableRotation", + false)); + + Logger::setMaxLogfileSize(Configuration::getValue("log_maxFileSize", + 1024)); + + Logger::setSwitchLogEachDay(Configuration::getBoolValue("log_perDay", + false)); + ResourceManager::initialize(); // Open database |