• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >Mysql > 写mongodb日志

写mongodb日志

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2018-12-05

匿名通过本文主要向大家介绍了mongodb,日志等相关知识,希望本文的分享对您有所帮助

The following steps create and rotate a log file: Start awith verbose logging, with appending enabled, and with the following log file: mongod -v --logpath /var/log/mongodb/server1.log --logappend In a separate terminal, list the matching

The following steps create and rotate a log file:

  • Start a with verbose logging, with appending enabled, and with the following log file:

    mongod -v --logpath /var/log/mongodb/server1.log --logappend

  • In a separate terminal, list the matching files:

    ls /var/log/mongodb/server1.log*

    For results, you get:

  • Rotate the log file using one of the following methods.

  • From the shell, issue the command from the admin database:

    This is the only available method to rotate log files on Windows systems.

  • From the UNIX shell, rotate logs for a single process by issuing the following command:

  • From the UNIX shell, rotate logs for all processes on a machine by issuing the following command:

  • List the matching files again:

    ls /var/log/mongodb/server1.log*

    For results you get something similar to the following. The timestamps will be different.

    server1.log server1.log.2011-11-24T23-30-00

    The example results indicate a log rotation performed at exactly 11:30 pm on November 24th, 2011 UTC, which is the local time offset by the local time zone. The original log file is the one with the timestamp. The new log is server1.log file.

    If you issue a second command an hour later, then an additional file would appear when listing matching files, as in the following example:

    server1.log server1.log.2011-11-24T23-30-00 server1.log.2011-11-25T00-30-00

    This operation does not modify the server1.log.2011-11-24T23-30-00 file created earlier, while server1.log.2011-11-25T00-30-00 is the previous server1.log file, renamed. server1.log is a new, empty file that receives all new log output.

  • ,免备案空间,香港服务器,美国空间
    分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

    您可能想查找下面的文章:

    • MongoDB中常用的语句总结
    • MongoDB导入json数据的方法
    • MongoDB提升性能的方法总结
    • 什么是MongoDB?MongoDB简介
    • 什么是mongoDB数据库
    • 黑马云课堂mongodb实操视频的源码课件推荐
    • 燕十八mongodb视频资料分享
    • 分享用MongoDB中oplog机制实现数据监控实例
    • 详细介绍MongoDB常用的操作
    • mongoDB是怎么实现分页的?

    相关文章

    • 2018-12-05详解MySQL新增的功能(事件调度器)实例
    • 2018-12-05关于节点配置的详细介绍
    • 2018-12-05Mysql Sql语句注释大全实例分享
    • 2018-12-05ORACLE 数据库RMAN备份恢复
    • 2018-12-05利用mysql的inet_aton()和inet_ntoa()函数存储IP地址的方法分享
    • 2018-12-05Oracle 数据库导出(exp)导入(imp)说明
    • 2017-05-11mysql错误处理之ERROR 1786 (HY000)
    • 2018-12-05SQLServer中数据库文件的存放方式,文件和文件组
    • 2018-12-05SQL语句进行数据表的增删改查教程(phpMyAdmin使用教程)
    • 2017-05-11MySQL数据库安全设置与注意事项小结

    文章分类

    • MsSql
    • Mysql
    • oracle
    • MariaDB
    • DB2
    • SQLite
    • PostgreSQL
    • MongoDB
    • Redis
    • Access
    • 数据库其它
    • sybase
    • HBase

    最近更新的内容

      • SQL数据操作基础(中级)8
      • MySQL数据库安全配置介绍第1/2页
      • MySQL如何开启远程连接
      • 讲述一个mysql 数据库恢复的实例
      • MySQL data的存储目录变更
      • MySQL修改账号的IP限制条件实例分享
      • MySQL动态增删改列字段
      • 一次非法关机导致mysql数据表损坏的实例解决
      • mysql中取系统当前时间,当前日期方便查询判定的代码
      • MYSQL数据库中的现有表增加新字段(列)

    关于我们 - 联系我们 - 免责声明 - 网站地图

    ©2020-2025 All Rights Reserved. linkedu.com 版权所有