mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
* Automatically track subloggers in allLoggers This PR introduces a new interface called `SubloggerAdder` for tracking allLoggers across startup phases. The interface enables us to register a single `SubloggerHook` during initial logger creation and hand off management of `allLoggers` during the three phases we need to handle: - Before `CoreConfig` is created, the `SubloggerHook` (`AppendToAllLoggers`) appends new subloggers to `ServerCommand.allLoggers`. - After `CoreConfig` is created and before `NewCore` returns, new subloggers are added to `CoreConfig.AllLoggers`. Intermediate state must also be kept in sync within NewCore to track new subloggers before we return to the server command and register the `Core.SubloggerAdder` implementation. - After `NewCore` returns to the server command, we register Core as the implementer of `ServerCommand.SubloggerAdder` ensuring that all new subloggers are appended to `Core.allLoggers`. * Wire up the sublogger hook in NewTestLogger |
||
|---|---|---|
| .. | ||
| benchhelpers | ||
| builtinplugins | ||
| constants | ||
| dhutil | ||
| experiments | ||
| fairshare | ||
| flag-kv | ||
| flag-slice | ||
| forwarding | ||
| hostutil | ||
| identity | ||
| locking | ||
| logging | ||
| metricsutil | ||
| monitor | ||
| namespace | ||
| osutil | ||
| parseip | ||
| pgpkeys | ||
| policies | ||
| proxyutil | ||
| random | ||
| storagepacker | ||
| syncmap | ||
| testhelpers | ||
| timeutil | ||
| useragent | ||
| versions | ||