mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-21 23:22:34 +01:00
fix: replace fmt.Sprintf in logger calls with structured fields and add LoopDelay default
fmt.Sprintf inside zap logger calls defeats structured logging, making log aggregation and filtering harder. All 6 sites now use proper zap fields (zap.Uint32, zap.Uint8, zap.String). LoopDelay had no viper.SetDefault, so omitting it from config.json caused a zero-value (0 ms) busy-loop in the recv loop. Default is now 50 ms, matching config.example.json.
This commit is contained in:
@@ -328,6 +328,7 @@ func LoadConfig() (*Config, error) {
|
||||
Enabled: true,
|
||||
OutputDir: "save-backups",
|
||||
})
|
||||
viper.SetDefault("LoopDelay", 50)
|
||||
|
||||
err := viper.ReadInConfig()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user