From 85f0e43ce7656cb5d9aee50e02a9b5abb375853a Mon Sep 17 00:00:00 2001 From: Jake Schuurmans Date: Tue, 27 Aug 2024 11:19:07 -0400 Subject: [PATCH] Fix issue where log level isn't correctly propagated --- config.yaml | 1 + go.mod | 2 +- go.sum | 4 ++-- internal/app/app.go | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config.yaml b/config.yaml index 27a4159..cc22136 100644 --- a/config.yaml +++ b/config.yaml @@ -12,6 +12,7 @@ endpoints: nats: connection_timeout: 60s kv_replication: 1 + creds_file: /etc/nats/nats.creds url: nats://nats:4222 otel: authenticate: false diff --git a/go.mod b/go.mod index edccb9a..297757f 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/google/uuid v1.6.0 github.com/hashicorp/go-retryablehttp v0.7.7 github.com/jeremywohl/flatten v1.0.1 - github.com/metal-toolbox/ctrl v0.2.5 + github.com/metal-toolbox/ctrl v0.2.6 github.com/metal-toolbox/fleetdb v1.19.3 github.com/metal-toolbox/rivets v1.3.3 github.com/mitchellh/copystructure v1.2.0 diff --git a/go.sum b/go.sum index 673902b..a2ab9fc 100644 --- a/go.sum +++ b/go.sum @@ -551,8 +551,8 @@ github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxU github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/metal-toolbox/conditionorc v1.1.1-0.20240805163108-b1c018c91b87 h1:C3Gkj7+bV18HgXJuzeJ6RAttzqsO6sDBF7I20x5JvWM= github.com/metal-toolbox/conditionorc v1.1.1-0.20240805163108-b1c018c91b87/go.mod h1:0Rh7BPun3VcJzxsBfbZ94lxxxSUNLtugAeZPRWPcD3c= -github.com/metal-toolbox/ctrl v0.2.5 h1:GEJbIdh+/1OI6h+3b9MeEQiFTJKXxX5jnJwu2ATZpbY= -github.com/metal-toolbox/ctrl v0.2.5/go.mod h1:8pNmlZr+GhhxZh35jLBX6kbZ+1q/8Ud5UIpXRebTmt4= +github.com/metal-toolbox/ctrl v0.2.6 h1:h4q6iiYd6jFKUqgKD32pwz+X5bZaXBWW6RwGaFLVcKc= +github.com/metal-toolbox/ctrl v0.2.6/go.mod h1:8pNmlZr+GhhxZh35jLBX6kbZ+1q/8Ud5UIpXRebTmt4= github.com/metal-toolbox/fleetdb v1.19.3 h1:Dk7MVi5rS42a4OI46Ye/etg8R5hm1iajaI4U0k1GSec= github.com/metal-toolbox/fleetdb v1.19.3/go.mod h1:v9agAzF7BhBBjA4rY+H2eZzQaBTEXO4b/Qikn4jmA7A= github.com/metal-toolbox/rivets v1.3.3 h1:bHd2HRh/uc3zb2bughpuidW2lUQOXrFRRDWBWwqMQWw= diff --git a/internal/app/app.go b/internal/app/app.go index ceca605..9f99572 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -49,7 +49,7 @@ func New(cfgFile, loglevel string, profiling bool) (*App, <-chan os.Signal, erro return nil, nil, err } - switch model.LogLevel(loglevel) { + switch model.LogLevel(app.Config.LogLevel) { case model.LogLevelDebug: app.Logger.Level = logrus.DebugLevel case model.LogLevelTrace: