json extension is used for audit log file by default even if BSON format is specified

Description

I was running the server like this:

and there are some rules for default audit log file location/name if you don't provide auditPath but in this case the file was created with "json" extension although the format is actually bson, so I think it would be better in this case to create it with a "bson" extension.

Environment

None

Smart Checklist

Activity

Paweł Lebioda March 11, 2025 at 7:51 PM

As concluded on a daily meeting in order to not break the backward compatibility with the existing behavior - the fix will use different extension based on the audit log format.

radoslaw.szulgo March 10, 2025 at 9:18 AM

we’d like to follow upstream so it’s easier to migrate from

Paweł Lebioda March 10, 2025 at 8:39 AM

The problem is that mongod defaults to auditLog.json for auditPath regardless of the specified format by auditFormat.
The mongod.1 somehow suggests that the auditPath is a required param if the auditDestination=file, which would be aligned with the observation from for the upstream:

I can fix it by setting the default file extension based on the format, or we could align the implementation with the upstream.

radoslaw.szulgo July 17, 2024 at 12:31 PM

sorry - I haven’t seen Sandra’s comment. I’m reopening.

Tomislav Plavcic July 17, 2024 at 11:54 AM

From what I see in Sandra's comment the ticket still applies to PSMDB 7.0 which is not EOL so not sure why it was closed.

Done

Details

Assignee

Reporter

Needs QA

Yes

Affects versions

Priority

Smart Checklist

Created February 10, 2017 at 1:25 PM
Updated last month
Resolved March 19, 2025 at 8:06 AM