fix: if logger is not ready, use a temporary one

This commit is contained in:
Derrick Hammer 2024-01-15 22:42:55 -05:00
parent 27ad581026
commit a8a39d523e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 0 deletions

View File

@ -73,6 +73,11 @@ func (p *PortalImpl) Config() *viper.Viper {
} }
func (p *PortalImpl) Logger() *zap.Logger { func (p *PortalImpl) Logger() *zap.Logger {
if p.logger == nil {
logger, _ := zap.NewDevelopment()
return logger
}
return p.logger return p.logger
} }