summaryrefslogtreecommitdiff
path: root/src/mongo/util/log.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2014-06-05 14:55:52 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2014-06-06 18:19:01 -0400
commit616461d294bd9f5054ca38b302b6fc5d70fde20c (patch)
tree671cd2efc28166c2a8cb9d6273954e5a38ea5255 /src/mongo/util/log.h
parentdae863af3f695fe98c16473ca07d79fb106121c0 (diff)
downloadmongo-616461d294bd9f5054ca38b302b6fc5d70fde20c.tar.gz
SERVER-4905: add flag to disable mongo's builtin log rotation
To support the standalone utility, we need to give administrators support for disabling Mongo's builtin log rotation.
Diffstat (limited to 'src/mongo/util/log.h')
-rw-r--r--src/mongo/util/log.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mongo/util/log.h b/src/mongo/util/log.h
index b61913a0d32..ab221bd01da 100644
--- a/src/mongo/util/log.h
+++ b/src/mongo/util/log.h
@@ -93,8 +93,16 @@ namespace logger {
/**
* Rotates the log files. Returns true if all logs rotate successfully.
+ *
+ * renameFiles - true means we rename files, false means we expect the file to be renamed
+ * externally
+ *
+ * logrotate on *nix systems expects us not to rename the file, it is expected that the program
+ * simply open the file again with the same name.
+ * We expect logrotate to rename the existing file before we rotate, and so the next open
+ * we do should result in a file create.
*/
- bool rotateLogs();
+ bool rotateLogs(bool renameFiles);
/** output the error # and error message with prefix.
handy for use as parm in uassert/massert.