summaryrefslogtreecommitdiff
path: root/state.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-27 14:00:32 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-27 14:00:32 +0200
commitd8e466712a4c5af17c27953b38f1b4e7d914d5cf (patch)
tree449149eaebdf8494a2bf8e3c7428b85814cd28b5 /state.go
parenta943641fdae051346355a3aaf1d8887da674c97c (diff)
Log: Add 'inherit' that sets the error level as the log level
Diffstat (limited to 'state.go')
-rw-r--r--state.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/state.go b/state.go
index 4e9f10e..940ba37 100644
--- a/state.go
+++ b/state.go
@@ -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),