feat(log): use github.com/qdm12/log library

This commit is contained in:
Quentin McGaw
2022-03-30 07:46:53 +00:00
parent 84607e332b
commit 179274ade0
14 changed files with 54 additions and 60 deletions

View File

@@ -6,7 +6,7 @@ import (
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/gluetun/internal/provider"
"github.com/qdm12/golibs/logging"
"github.com/qdm12/log"
)
type Runner interface {
@@ -35,7 +35,7 @@ func (l *Loop) Run(ctx context.Context, done chan<- struct{}) {
var vpnRunner vpnRunner
var serverName, vpnInterface string
var err error
subLogger := l.logger.NewChild(logging.Settings{Prefix: settings.Type + ": "})
subLogger := l.logger.New(log.SetComponent(settings.Type))
if settings.Type == constants.OpenVPN {
vpnInterface = settings.OpenVPN.Interface
vpnRunner, serverName, err = setupOpenVPN(ctx, l.fw,