Closed (fixed)
Project:
Audit Trail
Version:
1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2026 at 15:11 UTC
Updated:
15 Jun 2026 at 16:20 UTC
Jump to comment: Most recent
The chain-routing docs cover the PSR-3 logger path (mode flag/auto, channels[], chain: TRUE) well, but they do not document how AuditTrailInterface::event() selects its chain - a separate path with different rules. The result is real operator confusion: rows land in the default chain even though it has an empty channels list and mode: flag.
AuditTrail::event() resolves its chain as: a chain whose id equals the channel, else a chain that lists the channel in channels[], else the default chain (see AuditTrail::resolveChain()). It then records the row unconditionally - the chain's mode does NOT gate event(); mode only gates the PSR-3 logger path.default chain is the universal catch-all for every event() write (and every chain: TRUE logger call) whose channel no chain claims - regardless of the default chain's mode or channels.channels[] section says unmapped-channel entries flow through to whatever chain claims that channel next, or to plain dblog if none does. For event() (and chain: TRUE logger calls) that is incorrect: they land in default, not dblog.default chain's role as the catch-all is not stated on the configuration page or the chain edit form, so an operator reasonably expects an empty-channels / flag-mode chain to receive nothing.event() chain-resolution order (channel-as-id, then channels[], then default fallback) and that event() records regardless of mode.event() / chain: TRUE writes fall back to the default chain, and describe default as the catch-all.default chain catches unmapped channels regardless of mode.Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mably commentedOpened MR !18: documents the AuditTrail::event() chain resolution order (id -> channels[] -> default) and that event() always records regardless of mode, scopes the configuration.md mode wording to the generic logger path, and notes the default chain is the catch-all for unclaimed channels. Docs plus one form #description line; no behaviour change.
Comment #5
mably commentedComment #7
mably commentedMerged into 1.x.