YLH

导航

 

方法一、1.3.4以上版本,可以使用logRotate命令将日志文件进行切换。不过在Windows平台,需要2.0.3以上版本才行。

> use admin switched to db admin

> db.runCommand("logRotate") { "ok" : 1 }

>

方法二、 linux shell下

kill -SIGUSR1

 

http://www.cnblogs.com/yuechaotian/archive/2012/12/10/2810848.html

http://www.mongodb.org/display/DOCS/Logging#Logging-Rotatingthelogfiles

posted on 2013-04-12 17:43  YLH  阅读(398)  评论(0编辑  收藏  举报