fix: if logger is not ready, use a temporary one
This commit is contained in:
parent
27ad581026
commit
a8a39d523e
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue