Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-8032

When logs are rotated add to beginning of new log information about server and process

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Logging
    • None

      When someone wants to share logs, if there is no restart in the mongod (or mongos) log then there can be question about whether it's the right log (in case of multiple machines, etc).

      On startup mongod logs lots of information like this:
      Thu Dec 20 10:56:57 [initandlisten] MongoDB starting : pid=1795 port=27017 dbpath=/data/mongodb/mongodb_data 64-bit host=mongoshard-sl01
      Thu Dec 20 10:56:57 [initandlisten] db version v2.2.2-a, pdfile version 4.5
      Thu Dec 20 10:56:57 [initandlisten] git version: 74884ccdb077cf22fe9798a9c64b709cea4bee9b modules: subscription
      Thu Dec 20 10:56:57 [initandlisten] build info: Linux ip-10-123-37-120 3.0.13-0.27-ec2 #1 SMP Wed Feb 15 13:33:49 UTC 2012 (d73692b) x86_64 BOOST_LIB_VERSION=1_49
      Thu Dec 20 10:56:57 [initandlisten] options:

      { auth: "true", bind_ip: "127.0.0.1,172.27.131.129", config: "/etc/mongodb.conf", dbpath: "/data/mongodb/mongodb_data", fork: "true", logappend: "true", logpath: "/var/log/mongodb/mongodb-shardsvr.log", nohttpinterface: "true", port: 27017, quiet: true, replSet: "shard1", snmp-master: true }

      Thu Dec 20 10:56:57 [initandlisten] journal dir=/data/mongodb/mongodb_data/journal

      When logs are rotated if this information could be dumped to the top of the file, that would ensure the logs are always associated with the correct physical host and its role.

            Assignee:
            Unassigned Unassigned
            Reporter:
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: