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

newline characters in balancer log messages when acquiring distributed lock

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.6.0-rc2
    • 2.6.0-rc0
    • Logging, Usability
    • None

    Description

      In src/mongo/s/distlock.cpp:859:

      The log messages for acquiring a distributed log on LogLevel 1 contain newline characters, thus inserting many lines in the log file that do not start with a date.

      2014-03-06T13:11:36.421+1100 [Balancer] about to acquire distributed lock 'balancer/enter.local:27017:1394071745:16807:
      { "state" : 1,
        "who" : "enter.local:27017:1394071745:16807:Balancer:1622650073",
        "process" : "enter.local:27017:1394071745:16807",
        "when" : { "$date" : "2014-03-06T13:11:36.421+1100" },
        "why" : "doing balance round",
        "ts" : { "$oid" : "5317d95853d2a04cf55266ce" } }
      { "_id" : "balancer",
        "state" : 0,
        "ts" : { "$oid" : "5317d95253d2a04cf55266cd" } }
      2014-03-06T13:11:36.422+1100 [Balancer] distributed lock 'balancer/enter.local:27017:1394071745:16807' acquired, ts : 5317d95853d2a04cf55266ce

      This makes automatic log parsing difficult and should be avoided.

      Can we remove the newline characters from these messages and print the entire json string in the single line, consistent with other log messages?

      Attachments

        Activity

          People

            greg_10gen Greg Studer
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: