Files
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
..
2023-03-15 09:00:52 -07:00
2023-03-15 09:00:52 -07:00
2023-03-15 09:00:52 -07:00
2023-03-15 09:00:52 -07:00
2023-03-15 09:00:52 -07:00
2023-03-15 09:00:52 -07:00
2023-03-15 09:00:52 -07:00
2023-03-15 09:00:52 -07:00
2023-03-15 09:00:52 -07:00
2023-03-15 09:00:52 -07:00