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
|
type initFunc func(p interfaces.Portal) error
|
||||||
|
|
||||||
func initConfig(p interfaces.Portal) error {
|
func initConfig(p interfaces.Portal) error {
|
||||||
return config.Init()
|
return config.Init(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
func initIdentity(p interfaces.Portal) error {
|
func initIdentity(p interfaces.Portal) error {
|
||||||
|
|
|
@ -2,8 +2,8 @@ package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"git.lumeweb.com/LumeWeb/portal/interfaces"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"go.uber.org/zap"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -14,8 +14,8 @@ var (
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func Init() error {
|
func Init(p interfaces.Portal) error {
|
||||||
logger, _ := zap.NewDevelopment()
|
logger := p.Logger()
|
||||||
viper.SetConfigName("config")
|
viper.SetConfigName("config")
|
||||||
viper.SetConfigType("yaml")
|
viper.SetConfigType("yaml")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue