0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00

logRotate command to rotate logs SERVER-740

This commit is contained in:
Eliot Horowitz 2010-03-12 10:28:07 -05:00
parent 0a089d3a8c
commit 74e22e9d73

View File

@ -377,5 +377,16 @@ namespace mongo {
} fsyncCmd;
class LogRotateCmd : public Command {
public:
LogRotateCmd() : Command( "logRotate" ){}
virtual LockType locktype(){ return NONE; }
virtual bool slaveOk(){ return true; }
virtual bool adminOnly(){ return true; }
virtual bool run(const char *ns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool fromRepl) {
rotateLogs();
}
} logRotateCmd;
}