This commit is contained in:
parent
da5675c642
commit
570ad1e2ec
@ -130,7 +130,6 @@ func LoadConfig(filePath string) (Config, error) {
|
|||||||
var config Config
|
var config Config
|
||||||
|
|
||||||
if err := hclsimple.DecodeFile(filePath, nil, &config); err != nil {
|
if err := hclsimple.DecodeFile(filePath, nil, &config); err != nil {
|
||||||
slog.Debugf("Failed to load config from %s: %v", filePath, err)
|
|
||||||
return config, errors.Join(ErrLoadingConfig, err)
|
return config, errors.Join(ErrLoadingConfig, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
main.go
2
main.go
@ -136,7 +136,7 @@ func main() {
|
|||||||
|
|
||||||
// Load configuration
|
// Load configuration
|
||||||
config, err := LoadConfig(*configPath)
|
config, err := LoadConfig(*configPath)
|
||||||
slog.OnErrFatalf(err, "Error loading config: %v", err)
|
slog.OnErrFatalf(err, "Error loading config")
|
||||||
|
|
||||||
// Serve metrics exporter, if specified
|
// Serve metrics exporter, if specified
|
||||||
if ExportMetrics {
|
if ExportMetrics {
|
||||||
|
Loading…
Reference in New Issue
Block a user