Context
Noticed in PYTHON-4470, sometimes the "message" field appears first:
2024-05-30 17:05:23,416 DEBUG logger {"message": "Server selection started", "selector": "Primary()", "operation": "find", "topologyDescription": "<TopologyDescription id: 66591443670fd30de8d7babf, topology_type: Single, servers: [<ServerDescription ('localhost', 27017) server_type: Standalone, rtt: 0.0006972090050112456>]>", "clientId": {"$oid": "66591443670fd30de8d7babf"}}
But other times "clientId" appears first:
2024-05-30 17:05:23,416 DEBUG logger {"clientId": {"$oid": "66591443670fd30de8d7babf"}, "message": "Command succeeded", "durationMS": 0.39599999999999996, "reply": "{\"cursor\": {\"ns\": \"test.test\"}, \"ok\": 1.0}", "commandName": "find", "databaseName": "test", "requestId": 470211272, "operationId": 470211272, "driverConnectionId": 1, "serverConnectionId": 1028, "serverHost": "localhost", "serverPort": 27017}
Logging records should have a standard field order.
Definition of done
Logging records have a standard field order. Either "message" always appears first or "clientId" always does.