Commit graph

8 commits

Author SHA1 Message Date
9f05f933dd ♲ Refactor configuration to use viper with context propagation
- Replace global ConfigPath and Overrides with viper-based configuration
- Add viper.New() to create configurable viper instances
- Store viper and unmarshaled Config struct in context for testability
- Add RetrieveFromContext and AddToContext helper functions
- Update files.Append to accept context and retrieve config from it
- Update formatters.Preferred and formatters.New to accept context
- Add PersistentPreRunE in CLI to create and configure viper instance
- Support -c flag for custom config file path
- Support -v flag for config value overrides
- Update all test files to create viper and add to context
- Remove unused config types and load functions
- Add viper as dependency with automatic env var support (MYLOG_*)
2026-03-09 13:46:01 -05:00
8086029b03 🚚 Rename stdout.config.formatter to format 2024-03-10 21:08:34 -05:00
da3b524925 Separate formatters in config 2024-03-07 21:19:45 -06:00
a61af1b4b3 Use dot as folder separator
Also don't add dot if no extension
2024-02-26 19:30:32 -06:00
a6f3cf39a0 🐛 Load config env before paraing cli 2024-02-10 11:48:23 -06:00
85f666cbc2 Parse env vars 2024-02-10 11:06:00 -06:00
25f5c37243 Parse config overrides on cli 2024-02-09 09:44:35 -06:00
40f9518611 Load config from file with defaults 2024-02-04 18:19:19 -06:00