0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 17:10:48 +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

@ -376,6 +376,17 @@ 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;
}