Allow MYLOG_CONFIG_PATH to override the config path

This commit is contained in:
Dan Jones 2026-03-09 16:48:58 -05:00
commit edf10de879
4 changed files with 18 additions and 20 deletions

View file

@ -22,7 +22,7 @@
## Config System
- Viper instance is stored in context using a custom key type (`confKeyType`)
- Use `config.New(path, overrides)` to create a new viper instance
- Use `config.New(ctx, path)` to create a new viper instance
- Use `config.RetrieveFromContext(ctx)` to get both viper and the unmarshaled Config struct
- Formatters can use `v.Sub("formatters." + kind)` to get their own sub-config and unmarshal into their specific config struct
- Test files must create viper instances and add them to context using `config.AddToContext`