Files
cybertron-log-enricher/pkg/log/config.go
2024-12-21 18:19:18 +05:30

28 lines
484 B
Go

package log
import (
"encoding/json"
"go.uber.org/zap"
)
func NewCustomZapConfig() zap.Config {
rawJSON := []byte(`{
"level": "debug",
"development": false,
"sampling": {
"initial": 100,
"thereafter": 100
},
"disableCaller": true,
"encoding": "json",
"OutputPaths": ["stdout"],
"ErrorOutputPaths": ["stderr"]
}`)
var cfg zap.Config
if err := json.Unmarshal(rawJSON, &cfg); err != nil {
panic(err)
}
return cfg
}