vault/helper
Mike Palmiotto 4c8cc87794
Automatically track subloggers in allLoggers (#22038)
* 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
2023-08-08 17:47:09 +00:00
..
benchhelpers adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
builtinplugins Stop passing in loggers to clusters explicitly (#21999) 2023-07-24 10:51:02 -04:00
constants adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
dhutil adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
experiments * wire experiments through options for tests (#21873) 2023-07-14 17:53:10 -04:00
fairshare fix function name in comment (#21214) 2023-06-16 16:03:07 -04:00
flag-kv adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
flag-slice adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
forwarding Bump google.golang.go/protobuf dependency to v1.31.0 (#22176) 2023-08-02 17:19:16 +00:00
hostutil adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
identity Bump google.golang.go/protobuf dependency to v1.31.0 (#22176) 2023-08-02 17:19:16 +00:00
locking adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
logging Automatically track subloggers in allLoggers (#22038) 2023-08-08 17:47:09 +00:00
metricsutil VAULT-15395: Support mocking time functions in the activity log (#20720) 2023-05-23 16:25:23 +00:00
monitor adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
namespace adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
osutil adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
parseip adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
pgpkeys adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
policies adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
proxyutil adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
random Vault-12308: Change password policy testing to be deterministic (#20625) 2023-05-17 18:22:19 +00:00
storagepacker Bump google.golang.go/protobuf dependency to v1.31.0 (#22176) 2023-08-02 17:19:16 +00:00
syncmap Use the sorted values so that the test is not flaky (#21479) 2023-06-27 17:38:58 +00:00
testhelpers Automatically track subloggers in allLoggers (#22038) 2023-08-08 17:47:09 +00:00
timeutil VAULT-15395: Support mocking time functions in the activity log (#20720) 2023-05-23 16:25:23 +00:00
useragent VAULT-15547 Agent/proxy decoupling, take two (#20634) 2023-05-19 13:17:48 -04:00
versions adding copyright header (#19555) 2023-03-15 09:00:52 -07:00