Commit 337f0cb4 authored by suyanlong's avatar suyanlong

1、remove unused config information.

2、update makefile and update README.md.
parent 39f07654
Pipeline #8304 canceled with stages
......@@ -43,6 +43,7 @@ build: packr
rm -f imports/imports.go
$(GO) build -tags=go_json -ldflags '${GOLDFLAGS}' ./cmd/${APP_NAME}
@mv ./sidecar bin
@cp ./config/authz_* bin/
@printf "${GREEN}Build sidecar successfully!${NC}\n"
.PHONY: test fmt_proto fmt_shell check checkgofmt
......@@ -151,6 +152,7 @@ grpc:
clean:
@go clean
@rm -rf bin
build-dep:
@go install golang.org/x/tools/cmd/goimports@latest
......
......@@ -84,15 +84,13 @@ filename = "sidecar.log"
report_caller = false
[log.module]
app = "info"
manager = "info"
api_server = "info"
appchain_mgr = "info"
bxh_lite = "info"
executor = "info"
exchanger = "info"
monitor = "info"
rule_mgr = "info"
peer_mgr = "info"
router = "info"
rule_mgr = "info"
swarm = "info"
syncer = "info"
......
......@@ -11,15 +11,13 @@ filename = "sidecar.log"
report_caller = false
[log.module]
app = "info"
manager = "info"
api_server = "info"
appchain_mgr = "info"
bxh_lite = "info"
executor = "info"
exchanger = "info"
monitor = "info"
rule_mgr = "info"
peer_mgr = "info"
router = "info"
rule_mgr = "info"
swarm = "info"
syncer = "info"
......
......@@ -66,7 +66,7 @@ func NewSidecar(repoRoot string, config *repo.Config) (internal.Launcher, error)
cryptor := txcrypto.NewCryptor(nil, appchainMgr, privateKey)
clientPort := appchain.NewPorts(clients, cryptor, logger)
r.Adds(clientPort)
rule, err := rulemgr.New(store, loggers.Logger(loggers.Rule))
rule, err := rulemgr.New(store, loggers.Logger(loggers.RuleMgr))
tool.Asset(err)
mg, err := manager.NewManager(addr.String(), pm, appchainMgr, rule, loggers.Logger(loggers.Manager))
tool.Asset(err)
......
......@@ -17,7 +17,6 @@ func TestLogger(t *testing.T) {
Level: "info",
Module: repo.LogModule{
AppchainMgr: "info",
Exchanger: "info",
Executor: "info",
App: "info",
Monitor: "info",
......@@ -26,7 +25,7 @@ func TestLogger(t *testing.T) {
PeerMgr: "info",
Router: "info",
ApiServer: "info",
Manger: "info",
Manager: "info",
},
},
}
......
......@@ -10,16 +10,13 @@ import (
const (
ApiServer = "api_server"
App = "app"
Manager = "manager"
RuleMgr = "rule_mgr"
AppchainMgr = "appchain_mgr"
Executor = "executor"
Exchanger = "exchanger"
Monitor = "monitor"
PeerMgr = "peer_mgr"
Router = "router"
Swarm = "swarm"
Syncer = "syncer"
Manager = "manager"
Rule = "rule"
)
var w *loggerWrapper
......@@ -36,12 +33,6 @@ func InitializeLogger(config *repo.Config) {
m[App].Logger.SetLevel(log.ParseLevel(config.Log.Level))
m[AppchainMgr] = log.NewWithModule(AppchainMgr)
m[AppchainMgr].Logger.SetLevel(log.ParseLevel(config.Log.Module.AppchainMgr))
m[Exchanger] = log.NewWithModule(Exchanger)
m[Exchanger].Logger.SetLevel(log.ParseLevel(config.Log.Module.Exchanger))
m[Executor] = log.NewWithModule(Executor)
m[Executor].Logger.SetLevel(log.ParseLevel(config.Log.Module.Executor))
m[Monitor] = log.NewWithModule(Monitor)
m[Monitor].Logger.SetLevel(log.ParseLevel(config.Log.Module.Monitor))
m[Router] = log.NewWithModule(Router)
m[Router].Logger.SetLevel(log.ParseLevel(config.Log.Module.Router))
m[Swarm] = log.NewWithModule(Swarm)
......@@ -51,9 +42,9 @@ func InitializeLogger(config *repo.Config) {
m[PeerMgr] = log.NewWithModule(PeerMgr)
m[PeerMgr].Logger.SetLevel(log.ParseLevel(config.Log.Module.PeerMgr))
m[Manager] = log.NewWithModule(Manager)
m[Manager].Logger.SetLevel(log.ParseLevel(config.Log.Module.Manger))
m[Rule] = log.NewWithModule(Rule)
m[Rule].Logger.SetLevel(log.ParseLevel(config.Log.Module.Rule))
m[Manager].Logger.SetLevel(log.ParseLevel(config.Log.Module.Manager))
m[RuleMgr] = log.NewWithModule(RuleMgr)
m[RuleMgr].Logger.SetLevel(log.ParseLevel(config.Log.Module.Rule))
w = &loggerWrapper{loggers: m}
}
......
......@@ -66,7 +66,7 @@ type LogModule struct {
Router string `toml:"router" json:"router" json:"router,omitempty"`
Swarm string `toml:"swarm" json:"swarm" json:"swarm,omitempty"`
Syncer string `toml:"syncer" json:"syncer" json:"syncer,omitempty"`
Manger string `toml:"manager" json:"manager" json:"manager,omitempty"`
Manager string `toml:"manager" json:"manager" json:"manager,omitempty"`
Rule string `toml:"rule" json:"rule" json:"rule,omitempty"`
}
......@@ -94,15 +94,15 @@ func DefaultConfig() *Config {
ReportCaller: false,
Level: "info",
Module: LogModule{
App: "info",
Manager: "info",
ApiServer: "info",
AppchainMgr: "info",
Exchanger: "info",
Executor: "info",
Monitor: "info",
Swarm: "info",
Syncer: "info",
Rule: "info",
PeerMgr: "info",
Router: "info",
ApiServer: "info",
Swarm: "info",
Syncer: "info",
},
},
Peer: Peer{
......
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