mirror of https://bitbucket.org/ausocean/av.git
revid/config: Simplfied LogLevel check
This commit is contained in:
parent
8fa9f7df48
commit
f88c6fc096
|
@ -267,11 +267,7 @@ var (
|
||||||
// if particular parameters have not been defined.
|
// if particular parameters have not been defined.
|
||||||
func (c *Config) Validate() error {
|
func (c *Config) Validate() error {
|
||||||
switch c.LogLevel {
|
switch c.LogLevel {
|
||||||
case logger.Debug:
|
case logger.Debug, logger.Info, logger.Warning, logger.Error, logger.Fatal:
|
||||||
case logger.Info:
|
|
||||||
case logger.Warning:
|
|
||||||
case logger.Error:
|
|
||||||
case logger.Fatal:
|
|
||||||
default:
|
default:
|
||||||
c.LogLevel = defaultVerbosity
|
c.LogLevel = defaultVerbosity
|
||||||
c.Logger.Log(logger.Info, pkg+"bad LogLevel mode defined, defaulting", "LogLevel", defaultVerbosity)
|
c.Logger.Log(logger.Info, pkg+"bad LogLevel mode defined, defaulting", "LogLevel", defaultVerbosity)
|
||||||
|
|
Loading…
Reference in New Issue