From 73366a1ed8d27cf2b8ed88c5784dfcde2f52ab1a Mon Sep 17 00:00:00 2001 From: Elvin Date: Tue, 11 Jul 2023 11:16:08 +0800 Subject: [PATCH 1/2] remove log field of config because it is no longer used --- config/config.go | 10 ---------- main.go | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/config/config.go b/config/config.go index 26d17504..87aaefb9 100644 --- a/config/config.go +++ b/config/config.go @@ -9,7 +9,6 @@ import ( type Config struct { DB DbConfig `toml:"db"` JWT JWTConfig `toml:"jwt"` - Log LogConfig `toml:"log"` API APIConfig `toml:"api"` Node NodeConfig `toml:"node"` MessageService MessageServiceConfig `toml:"messageService"` @@ -26,11 +25,6 @@ type NodeConfig struct { Token string `toml:"token"` } -type LogConfig struct { - Path string `toml:"path"` - Level string `toml:"level"` -} - type APIConfig struct { Address string } @@ -141,10 +135,6 @@ func DefaultConfig() *Config { JWT: JWTConfig{ AuthURL: "http://127.0.0.1:8989", }, - Log: LogConfig{ - Path: "", - Level: "info", - }, API: APIConfig{ Address: "/ip4/127.0.0.1/tcp/39812", }, diff --git a/main.go b/main.go index ac36c431..61b27475 100644 --- a/main.go +++ b/main.go @@ -254,7 +254,7 @@ func runAction(cctx *cli.Context) error { provider := fx.Options( fx.Logger(fxLogger{}), // prover - fx.Supply(cfg, &cfg.DB, &cfg.API, &cfg.JWT, &cfg.Node, &cfg.Log, &cfg.MessageService, cfg.Libp2pNet, + fx.Supply(cfg, &cfg.DB, &cfg.API, &cfg.JWT, &cfg.Node, &cfg.MessageService, cfg.Libp2pNet, &cfg.Gateway, &cfg.RateLimit, cfg.Trace, cfg.Metrics, cfg.Publisher), fx.Supply(networkParams.NetworkName), fx.Supply(networkParams), From 451c5433a77e4502cd7a6922975d8d731174b184 Mon Sep 17 00:00:00 2001 From: Elvin Date: Wed, 2 Aug 2023 14:26:02 +0800 Subject: [PATCH 2/2] remove log field --- integration_test/mock_messager_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_test/mock_messager_server.go b/integration_test/mock_messager_server.go index 8594c353..abbccd36 100644 --- a/integration_test/mock_messager_server.go +++ b/integration_test/mock_messager_server.go @@ -99,7 +99,7 @@ func mockMessagerServer(ctx context.Context, repoPath string, cfg *config.Config provider := fx.Options( // prover - fx.Supply(cfg, &cfg.DB, &cfg.API, &cfg.JWT, &cfg.Node, &cfg.Log, &cfg.MessageService, cfg.Libp2pNet, + fx.Supply(cfg, &cfg.DB, &cfg.API, &cfg.JWT, &cfg.Node, &cfg.MessageService, cfg.Libp2pNet, &cfg.Gateway, &cfg.RateLimit, cfg.Trace, cfg.Metrics, cfg.Publisher), fx.Supply(fullNode), fx.Supply(networkParams.NetworkName),