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:
parent
0a089d3a8c
commit
74e22e9d73
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user