Merged in suppress-var (pull request #415)

revid/config: add logger suppression var Suppress to Variables slice and Config struct

Approved-by: Trek Hopton <trek.hopton@gmail.com>
This commit is contained in:
Saxon Milton 2020-05-19 23:58:42 +00:00
commit c2363d87a0
4 changed files with 14 additions and 1 deletions

2
go.mod
View File

@ -4,7 +4,7 @@ go 1.13
require ( require (
bitbucket.org/ausocean/iot v1.2.14 bitbucket.org/ausocean/iot v1.2.14
bitbucket.org/ausocean/utils v1.2.13 bitbucket.org/ausocean/utils v1.2.14
github.com/Comcast/gots v0.0.0-20190305015453-8d56e473f0f7 github.com/Comcast/gots v0.0.0-20190305015453-8d56e473f0f7
github.com/go-audio/audio v0.0.0-20181013203223-7b2a6ca21480 github.com/go-audio/audio v0.0.0-20181013203223-7b2a6ca21480
github.com/go-audio/wav v0.0.0-20181013172942-de841e69b884 github.com/go-audio/wav v0.0.0-20181013172942-de841e69b884

2
go.sum
View File

@ -6,6 +6,8 @@ bitbucket.org/ausocean/utils v1.2.11 h1:zA0FOaPjN960ryp8PKCkV5y50uWBYrIxCVnXjwbv
bitbucket.org/ausocean/utils v1.2.11/go.mod h1:uXzX9z3PLemyURTMWRhVI8uLhPX4uuvaaO85v2hcob8= bitbucket.org/ausocean/utils v1.2.11/go.mod h1:uXzX9z3PLemyURTMWRhVI8uLhPX4uuvaaO85v2hcob8=
bitbucket.org/ausocean/utils v1.2.13 h1:tUaIywtoMc1+zl1GCVQokX4mL5X7LNHX5O51AgAPrWA= bitbucket.org/ausocean/utils v1.2.13 h1:tUaIywtoMc1+zl1GCVQokX4mL5X7LNHX5O51AgAPrWA=
bitbucket.org/ausocean/utils v1.2.13/go.mod h1:uXzX9z3PLemyURTMWRhVI8uLhPX4uuvaaO85v2hcob8= bitbucket.org/ausocean/utils v1.2.13/go.mod h1:uXzX9z3PLemyURTMWRhVI8uLhPX4uuvaaO85v2hcob8=
bitbucket.org/ausocean/utils v1.2.14 h1:v5eBYavkEqKOBCppR6P451eT9UT/CQReMsOZZBUPX3Q=
bitbucket.org/ausocean/utils v1.2.14/go.mod h1:uXzX9z3PLemyURTMWRhVI8uLhPX4uuvaaO85v2hcob8=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Comcast/gots v0.0.0-20190305015453-8d56e473f0f7 h1:LdOc9B9Bj6LEsKiXShkLA3/kpxXb6LJpH+ekU2krbzw= github.com/Comcast/gots v0.0.0-20190305015453-8d56e473f0f7 h1:LdOc9B9Bj6LEsKiXShkLA3/kpxXb6LJpH+ekU2krbzw=

View File

@ -255,6 +255,9 @@ type Config struct {
// Defines the rate at which frames from a file source are processed. // Defines the rate at which frames from a file source are processed.
FileFPS uint FileFPS uint
// Holds logger suppression state.
Suppress bool
} }
// Validate checks for any errors in the config fields and defaults settings // Validate checks for any errors in the config fields and defaults settings

View File

@ -481,6 +481,14 @@ var Variables = []struct {
c.Saturation = _v c.Saturation = _v
}, },
}, },
{
Name: "Suppress",
Type_: "bool",
Update: func(c *Config, v string) {
c.Suppress = parseBool("Suppress", v, c)
c.Logger.(*logger.Logger).SetSuppress(c.Suppress)
},
},
{ {
Name: "VBRBitrate", Name: "VBRBitrate",
Type_: "uint", Type_: "uint",