[SERVER-8032] When logs are rotated add to beginning of new log information about server and process Created: 26/Dec/12  Updated: 15/Feb/13  Resolved: 26/Dec/12

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Asya Kamsky Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-7140 Print same information that prints on... Closed
Participants:

 Description   

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.


Generated at Thu Feb 08 03:16:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.