Commit 0d7f352c authored by OptimismBot's avatar OptimismBot Committed by GitHub

Merge pull request #6856 from ethereum-optimism/08-17-feat_indexer_Add_logging_to_config/config.go

feat(indexer): Add logging to config/config.go
parents 685dc8c9 30f96ecf
......@@ -88,6 +88,7 @@ type MetricsConfig struct {
// LoadConfig loads the `indexer.toml` config file from a given path
func LoadConfig(logger geth_log.Logger, path string) (Config, error) {
logger.Info("Loading config file", "path", path)
var conf Config
data, err := os.ReadFile(path)
......@@ -97,6 +98,8 @@ func LoadConfig(logger geth_log.Logger, path string) (Config, error) {
data = []byte(os.ExpandEnv(string(data)))
logger.Debug("Decoding config file", "data", string(data))
if _, err := toml.Decode(string(data), &conf); err != nil {
logger.Info("Failed to decode config file", "message", err)
return conf, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment