Added OPENVPN_VERBOSITY environment variable

This commit is contained in:
Quentin McGaw (desktop)
2020-02-22 15:48:09 +00:00
parent ab5d60754f
commit f45f40eee1
11 changed files with 25 additions and 8 deletions

View File

@@ -47,3 +47,9 @@ func (p *paramsReader) GetNetworkProtocol() (protocol models.NetworkProtocol, er
s, err := p.envParams.GetValueIfInside("PROTOCOL", []string{"tcp", "udp"}, libparams.Default("udp"))
return models.NetworkProtocol(s), err
}
// GetOpenVPNVerbosity obtains the verbosity level for verbosity between 0 and 6
// from the environment variable OPENVPN_VERBOSITY
func (p *paramsReader) GetOpenVPNVerbosity() (verbosity int, err error) {
return p.envParams.GetEnvIntRange("OPENVPN_VERBOSITY", 0, 6, libparams.Default("1"))
}