mirror of https://bitbucket.org/ausocean/av.git
vidforward: global logger returns underlying logger
The globalLogger type wraps a logger.Logger. If you use GetLogger which gets the global logger (which provides an interface logger.Logger) a type assertion to JSONLogger will fail, because the type is actually globalLogger. We need to provide the underlying logger instead when we return from GetLogger.
This commit is contained in:
parent
452d25ac0c
commit
ee7cb57fe5
|
@ -51,5 +51,6 @@ func GetLogger() logging.Logger {
|
||||||
if logger == nil {
|
if logger == nil {
|
||||||
panic("attempted get of uninstantiated global logger")
|
panic("attempted get of uninstantiated global logger")
|
||||||
}
|
}
|
||||||
return logger
|
// We want to return the underlying logger.
|
||||||
|
return logger.Logger
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue