feat(config): add temporary logging for failed reloads

- Add tmpLogBuf and tmpLog fields to capture config loading logs
  - Flush temporary logs only when reload succeeds
  - Extract NewLogger function for creating custom loggers
  - Update State interface to include FlushTmpLog method
This commit is contained in:
yusing
2025-10-10 22:20:12 +08:00
parent 357ce38b18
commit 38c0419483
4 changed files with 34 additions and 9 deletions

View File

@@ -30,6 +30,8 @@ type State interface {
IterProviders() iter.Seq2[string, types.RouteProvider]
NumProviders() int
StartProviders() error
FlushTmpLog()
}
// could be nil