refactor: since Portal.Logger can return a temporary logger, just use it

This commit is contained in:
Derrick Hammer 2024-01-15 22:44:28 -05:00
parent a8a39d523e
commit 212832eda1
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 4 additions and 4 deletions

View File

@ -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 {

View File

@ -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")