search

Home  >  Q&A  >  body text

nosql - 请问MongoDb的系统日志能限制大小吗?到一定程度就自动删除等,

目前MongDb的系统日志log非常大,已经去到几G的级别了.请问我们限制它的大小么?或者MongoDb自动清理

高洛峰高洛峰2893 days ago728

reply all(5)I'll reply

  • 天蓬老师

    天蓬老师2017-04-21 11:17:47

    MongoDB logRotate

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-21 11:17:47

    Use a fixed collection to store logs. When inserting new logs, the oldest logs will be deleted (if the preset size has been reached)

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-21 11:17:47

    The so-called capped collection

    reply
    0
  • PHP中文网

    PHP中文网2017-04-21 11:17:47

    You can use -v mode or -quiet mode to reduce the amount of irrelevant debugging logs

    reply
    0
  • PHPz

    PHPz2017-04-21 11:17:47

    Write a script to clean it up yourself

    reply
    0
  • Cancelreply