revid: config defaulting messages no longer warning level but rather info level

This commit is contained in:
Saxon 2019-03-04 12:47:57 +10:30
parent 05c2c77f31
commit e06465e46b
1 changed files with 13 additions and 13 deletions

View File

@ -126,7 +126,7 @@ func (c *Config) Validate(r *Revid) error {
case No:
case NothingDefined:
c.LogLevel = defaultVerbosity
c.Logger.Log(logger.Warning, pkg+"no LogLevel mode defined, defaulting",
c.Logger.Log(logger.Info, pkg+"no LogLevel mode defined, defaulting",
"LogLevel", defaultVerbosity)
default:
return errors.New("bad LogLevel defined in config")
@ -135,7 +135,7 @@ func (c *Config) Validate(r *Revid) error {
switch c.Input {
case Raspivid, V4L, File:
case NothingDefined:
c.Logger.Log(logger.Warning, pkg+"no input type defined, defaulting", "input",
c.Logger.Log(logger.Info, pkg+"no input type defined, defaulting", "input",
defaultInput)
c.Input = defaultInput
default:
@ -160,10 +160,10 @@ func (c *Config) Validate(r *Revid) error {
}
case NothingDefined:
c.Logger.Log(logger.Warning, pkg+"no input codec defined, defaulting",
c.Logger.Log(logger.Info, pkg+"no input codec defined, defaulting",
"inputCodec", defaultInputCodec)
c.InputCodec = defaultInputCodec
c.Logger.Log(logger.Warning, pkg+"defaulting quantization", "quantization",
c.Logger.Log(logger.Info, pkg+"defaulting quantization", "quantization",
defaultQuantization)
c.Quantization = defaultQuantization
@ -189,7 +189,7 @@ func (c *Config) Validate(r *Revid) error {
c.Packetization = Flv
c.SendRetry = true
case NothingDefined:
c.Logger.Log(logger.Warning, pkg+"no output defined, defaulting", "output",
c.Logger.Log(logger.Info, pkg+"no output defined, defaulting", "output",
defaultOutput)
c.Outputs[i] = defaultOutput
c.Packetization = defaultPacketization
@ -205,43 +205,43 @@ func (c *Config) Validate(r *Revid) error {
}
if c.BurstPeriod == 0 {
c.Logger.Log(logger.Warning, pkg+"no burst period defined, defaulting", "burstPeriod", defaultBurstPeriod)
c.Logger.Log(logger.Info, pkg+"no burst period defined, defaulting", "burstPeriod", defaultBurstPeriod)
c.BurstPeriod = defaultBurstPeriod
}
if c.FramesPerClip < 1 {
c.Logger.Log(logger.Warning, pkg+"no FramesPerClip defined, defaulting",
c.Logger.Log(logger.Info, pkg+"no FramesPerClip defined, defaulting",
"framesPerClip", defaultFramesPerClip)
c.FramesPerClip = defaultFramesPerClip
}
if c.Width == 0 {
c.Logger.Log(logger.Warning, pkg+"no width defined, defaulting", "width", defaultWidth)
c.Logger.Log(logger.Info, pkg+"no width defined, defaulting", "width", defaultWidth)
c.Width = defaultWidth
}
if c.Height == 0 {
c.Logger.Log(logger.Warning, pkg+"no height defined, defaulting", "height", defaultHeight)
c.Logger.Log(logger.Info, pkg+"no height defined, defaulting", "height", defaultHeight)
c.Height = defaultHeight
}
if c.FrameRate == 0 {
c.Logger.Log(logger.Warning, pkg+"no frame rate defined, defaulting", "fps", defaultFrameRate)
c.Logger.Log(logger.Info, pkg+"no frame rate defined, defaulting", "fps", defaultFrameRate)
c.FrameRate = defaultFrameRate
}
if c.Bitrate == 0 {
c.Logger.Log(logger.Warning, pkg+"no bitrate defined, defaulting", "bitrate", defaultBitrate)
c.Logger.Log(logger.Info, pkg+"no bitrate defined, defaulting", "bitrate", defaultBitrate)
c.Bitrate = defaultBitrate
}
if c.IntraRefreshPeriod == 0 {
c.Logger.Log(logger.Warning, pkg+"no intra refresh defined, defaulting", "intraRefresh", defaultIntraRefreshPeriod)
c.Logger.Log(logger.Info, pkg+"no intra refresh defined, defaulting", "intraRefresh", defaultIntraRefreshPeriod)
c.IntraRefreshPeriod = defaultIntraRefreshPeriod
}
if c.Quantization == 0 {
c.Logger.Log(logger.Warning, pkg+"no quantization defined, defaulting", "quantization", defaultQuantization)
c.Logger.Log(logger.Info, pkg+"no quantization defined, defaulting", "quantization", defaultQuantization)
c.Quantization = defaultQuantization
} else if c.Quantization > 51 {
return errors.New("quantisation is over threshold")