Commit 4026c05b authored by Will Cory's avatar Will Cory

chore(indexer): Remove logger config from config

parent 24a26fce
...@@ -25,11 +25,7 @@ type Cli struct { ...@@ -25,11 +25,7 @@ type Cli struct {
} }
func runIndexer(ctx *cli.Context) error { func runIndexer(ctx *cli.Context) error {
logger := log.NewLogger(log.CLIConfig{ logger := log.NewLogger(log.ReadCLIConfig(ctx))
Level: "warn",
Color: false,
Format: "terminal",
})
configPath := ctx.String(ConfigFlag.Name) configPath := ctx.String(ConfigFlag.Name)
cfg, err := config.LoadConfig(logger, configPath) cfg, err := config.LoadConfig(logger, configPath)
...@@ -38,8 +34,6 @@ func runIndexer(ctx *cli.Context) error { ...@@ -38,8 +34,6 @@ func runIndexer(ctx *cli.Context) error {
return err return err
} }
logger = log.NewLogger(cfg.Logger)
db, err := database.NewDB(cfg.DB) db, err := database.NewDB(cfg.DB)
if err != nil { if err != nil {
......
...@@ -6,8 +6,6 @@ import ( ...@@ -6,8 +6,6 @@ import (
"reflect" "reflect"
"github.com/BurntSushi/toml" "github.com/BurntSushi/toml"
"github.com/ethereum-optimism/optimism/op-service/log"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
geth_log "github.com/ethereum/go-ethereum/log" geth_log "github.com/ethereum/go-ethereum/log"
"github.com/joho/godotenv" "github.com/joho/godotenv"
...@@ -22,7 +20,6 @@ type Config struct { ...@@ -22,7 +20,6 @@ type Config struct {
DB DBConfig DB DBConfig
API APIConfig API APIConfig
Metrics MetricsConfig Metrics MetricsConfig
Logger log.CLIConfig
} }
// fetch this via onchain config from RPCsConfig and remove from config in future // fetch this via onchain config from RPCsConfig and remove from config in future
......
...@@ -16,7 +16,6 @@ import ( ...@@ -16,7 +16,6 @@ import (
op_e2e "github.com/ethereum-optimism/optimism/op-e2e" op_e2e "github.com/ethereum-optimism/optimism/op-e2e"
"github.com/ethereum-optimism/optimism/op-node/testlog" "github.com/ethereum-optimism/optimism/op-node/testlog"
op_log "github.com/ethereum-optimism/optimism/op-service/log"
"github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
...@@ -60,9 +59,6 @@ func createE2ETestSuite(t *testing.T) E2ETestSuite { ...@@ -60,9 +59,6 @@ func createE2ETestSuite(t *testing.T) E2ETestSuite {
// Indexer Configuration and Start // Indexer Configuration and Start
indexerCfg := config.Config{ indexerCfg := config.Config{
Logger: op_log.CLIConfig{
Level: "warn",
},
DB: config.DBConfig{ DB: config.DBConfig{
Host: "127.0.0.1", Host: "127.0.0.1",
Port: 5432, Port: 5432,
......
...@@ -22,11 +22,3 @@ port = 8080 ...@@ -22,11 +22,3 @@ port = 8080
host = "127.0.0.1" host = "127.0.0.1"
port = 7300 port = 7300
[logger]
# Log level: trace, debug, info, warn, error, crit. Capitals are accepted too.
level = "info"
# Color the log output. Defaults to true if terminal is detected.
color = true
# Format the log output. Supported formats: 'text', 'terminal', 'logfmt', 'json', 'json-pretty'
format = "terminal"
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