Maint: package local log levels

This commit is contained in:
Quentin McGaw (desktop)
2021-09-23 17:05:48 +00:00
parent cf95692b93
commit 79f243e98d
5 changed files with 58 additions and 49 deletions
+4 -8
View File
@@ -3,8 +3,6 @@ package openvpn
import (
"context"
"strings"
"github.com/qdm12/golibs/logging"
)
func streamLines(ctx context.Context, done chan<- struct{},
@@ -32,16 +30,14 @@ func streamLines(ctx context.Context, done chan<- struct{},
continue // filtered out
}
if errLine {
level = logging.LevelError
level = levelError
}
switch level {
case logging.LevelDebug:
logger.Debug(line)
case logging.LevelInfo:
case levelInfo:
logger.Info(line)
case logging.LevelWarn:
case levelWarn:
logger.Warn(line)
case logging.LevelError:
case levelError:
logger.Error(line)
}
if strings.Contains(line, "Initialization Sequence Completed") {