refactor: since Portal.Logger can return a temporary logger, just use it
This commit is contained in:
parent
a8a39d523e
commit
212832eda1
|
@ -13,7 +13,7 @@ import (
|
|||
type initFunc func(p interfaces.Portal) error
|
||||
|
||||
func initConfig(p interfaces.Portal) error {
|
||||
return config.Init()
|
||||
return config.Init(p)
|
||||
}
|
||||
|
||||
func initIdentity(p interfaces.Portal) error {
|
||||
|
|
|
@ -2,8 +2,8 @@ package config
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"git.lumeweb.com/LumeWeb/portal/interfaces"
|
||||
"github.com/spf13/viper"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -14,8 +14,8 @@ var (
|
|||
}
|
||||
)
|
||||
|
||||
func Init() error {
|
||||
logger, _ := zap.NewDevelopment()
|
||||
func Init(p interfaces.Portal) error {
|
||||
logger := p.Logger()
|
||||
viper.SetConfigName("config")
|
||||
viper.SetConfigType("yaml")
|
||||
|
||||
|
|
Loading…
Reference in New Issue