switch all other services to struct tag based env config

This commit is contained in:
Willy Kloucek
2022-01-07 15:47:47 +00:00
committed by Jörn Friedrich Dreyer
parent 288d6c469e
commit 6990e7d660
116 changed files with 1024 additions and 1991 deletions
+17
View File
@@ -0,0 +1,17 @@
package logging
import (
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/proxy/pkg/config"
)
// LoggerFromConfig initializes a service-specific logger instance.
func Configure(name string, cfg config.Log) log.Logger {
return log.NewLogger(
log.Name(name),
log.Level(cfg.Level),
log.Pretty(cfg.Pretty),
log.Color(cfg.Color),
log.File(cfg.File),
)
}