diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-09-27 14:00:32 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-09-27 14:00:32 +0200 |
| commit | d8e466712a4c5af17c27953b38f1b4e7d914d5cf (patch) | |
| tree | 449149eaebdf8494a2bf8e3c7428b85814cd28b5 /state.go | |
| parent | a943641fdae051346355a3aaf1d8887da674c97c (diff) | |
Log: Add 'inherit' that sets the error level as the log level
Diffstat (limited to 'state.go')
| -rw-r--r-- | state.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -478,7 +478,8 @@ func (state *VPNState) GetConfigSecureInternet( config, configType, configErr := state.getConfig(server, forceTCP) if configErr != nil { - state.Logger.Error( + state.Logger.Inherit( + configErr, fmt.Sprintf( "Failed getting a secure internet configuration with error: %s", GetErrorTraceback(configErr), @@ -548,7 +549,7 @@ func (state *VPNState) GetConfigInstituteAccess(url string, forceTCP bool) (stri config, configType, configErr := state.getConfig(server, forceTCP) if configErr != nil { - state.Logger.Error( + state.Logger.Inherit(configErr, fmt.Sprintf( "Failed getting an institute access server configuration with error: %s", GetErrorTraceback(configErr), @@ -577,7 +578,8 @@ func (state *VPNState) GetConfigCustomServer(url string, forceTCP bool) (string, config, configType, configErr := state.getConfig(server, forceTCP) if configErr != nil { - state.Logger.Error( + state.Logger.Inherit( + configErr, fmt.Sprintf( "Failed getting a custom server with error: %s", GetErrorTraceback(configErr), |
