Since commit #edab131 (audit_logging: Remove debug log header and JSON Authentication: prefix) (bug #13714), JSON audit logs in Samba are formatted in a way that is difficult to interpret and problematic for log processing. In Samba, " " (two spaces) is normally used to denote a multiline log entry associated with a specific header. However: 1) Every JSON audit log is prefixed with " ". 2) These entries are appended to the previous log header. Consequently: 1) JSON audit events visually appear to belong to the preceding header, which is misleading. 2) Systems like rsyslog using readMode 2 fail to correctly ingest the JSON logs because they cannot distinguish them from the previous multiline log entry.
Merge request https://gitlab.com/samba-team/samba/-/merge_requests/4392
This bug was referenced in samba master: 3c30c4740f40f633b5a71c772374e6c1283ec13c b86bcc58b0ea43c4ab85e0030a9522c686877043 35cb872ab44ba9fe0782164a979c112705374cee 788af2540eb289fae6780ce7684172c5a3487166