Optional Authentication

This commit is contained in:
Hein
2025-12-02 14:14:38 +02:00
parent 78029fb34f
commit 08050c960d
7 changed files with 420 additions and 73 deletions

View File

@@ -23,6 +23,15 @@ func Init(dev bool) {
}
func UpdateLoggerPath(path string, dev bool) {
defaultConfig := zap.NewProductionConfig()
if dev {
defaultConfig = zap.NewDevelopmentConfig()
}
defaultConfig.OutputPaths = []string{path}
UpdateLogger(&defaultConfig)
}
func UpdateLogger(config *zap.Config) {
defaultConfig := zap.NewProductionConfig()
defaultConfig.OutputPaths = []string{"resolvespec.log"}