Skip to content

Commit

Permalink
fix: fix logging section in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
kianaza committed Jul 5, 2024
1 parent 82bb237 commit c0e7fa9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions internal/cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cmd

import (
"fmt"
"os"

"github.com/snapp-incubator/nats-blackbox-exporter/internal/config"
Expand All @@ -20,8 +19,6 @@ func Execute() {
pflag.StringVar(&settingsPath, "settings", "/opt/nats-blackbox-exporter/settings.yml", "Path to settings file")
pflag.Parse()

Check warning on line 20 in internal/cmd/root.go

View check run for this annotation

Codecov / codecov/patch

internal/cmd/root.go#L19-L20

Added lines #L19 - L20 were not covered by tests

fmt.Println("settingsPath", settingsPath)

cfg := config.New(settingsPath)

Check warning on line 22 in internal/cmd/root.go

View check run for this annotation

Codecov / codecov/patch

internal/cmd/root.go#L22

Added line #L22 was not covered by tests

logger := logger.New(cfg.Logger)
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func New(settingsPath string) Config {

// load configuration from file
if err := k.Load(file.Provider(settingsPath), yaml.Parser()); err != nil {
log.Printf("error loading config.yaml")
log.Printf("error loading config.yaml from: %s", settingsPath)

Check warning on line 46 in internal/config/config.go

View check run for this annotation

Codecov / codecov/patch

internal/config/config.go#L45-L46

Added lines #L45 - L46 were not covered by tests
}

// load environment variables
Expand Down

0 comments on commit c0e7fa9

Please sign in to comment.