mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
added warn logs
This commit is contained in:
parent
e3a5a4b0e7
commit
da47992bf1
2 changed files with 16 additions and 0 deletions
|
|
@ -987,6 +987,7 @@ func setHTTP(ctx *cli.Context, cfg *node.Config) {
|
||||||
cfg.HTTPHost = "127.0.0.1"
|
cfg.HTTPHost = "127.0.0.1"
|
||||||
if ctx.GlobalIsSet(RPCLegacyListenAddrFlag.Name) {
|
if ctx.GlobalIsSet(RPCLegacyListenAddrFlag.Name) {
|
||||||
cfg.HTTPHost = ctx.GlobalString(RPCLegacyListenAddrFlag.Name)
|
cfg.HTTPHost = ctx.GlobalString(RPCLegacyListenAddrFlag.Name)
|
||||||
|
log.Warn("The flag --rpcaddr is deprecated and will be removed in the future, please use --http.addr")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ctx.GlobalBool(HTTPEnabledFlag.Name) && cfg.HTTPHost == "" {
|
if ctx.GlobalBool(HTTPEnabledFlag.Name) && cfg.HTTPHost == "" {
|
||||||
|
|
@ -998,6 +999,7 @@ func setHTTP(ctx *cli.Context, cfg *node.Config) {
|
||||||
|
|
||||||
if ctx.GlobalIsSet(RPCLegacyPortFlag.Name) {
|
if ctx.GlobalIsSet(RPCLegacyPortFlag.Name) {
|
||||||
cfg.HTTPPort = ctx.GlobalInt(RPCLegacyPortFlag.Name)
|
cfg.HTTPPort = ctx.GlobalInt(RPCLegacyPortFlag.Name)
|
||||||
|
log.Warn("The flag --rpcport is deprecated and will be removed in the future, please use --http.port")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(HTTPPortFlag.Name) {
|
if ctx.GlobalIsSet(HTTPPortFlag.Name) {
|
||||||
cfg.HTTPPort = ctx.GlobalInt(HTTPPortFlag.Name)
|
cfg.HTTPPort = ctx.GlobalInt(HTTPPortFlag.Name)
|
||||||
|
|
@ -1005,6 +1007,7 @@ func setHTTP(ctx *cli.Context, cfg *node.Config) {
|
||||||
|
|
||||||
if ctx.GlobalIsSet(RPCLegacyCORSDomainFlag.Name) {
|
if ctx.GlobalIsSet(RPCLegacyCORSDomainFlag.Name) {
|
||||||
cfg.HTTPCors = splitAndTrim(ctx.GlobalString(RPCLegacyCORSDomainFlag.Name))
|
cfg.HTTPCors = splitAndTrim(ctx.GlobalString(RPCLegacyCORSDomainFlag.Name))
|
||||||
|
log.Warn("The flag --rpccorsdomain is deprecated and will be removed in the future, please use --http.corsdomain")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(HTTPCORSDomainFlag.Name) {
|
if ctx.GlobalIsSet(HTTPCORSDomainFlag.Name) {
|
||||||
cfg.HTTPCors = splitAndTrim(ctx.GlobalString(HTTPCORSDomainFlag.Name))
|
cfg.HTTPCors = splitAndTrim(ctx.GlobalString(HTTPCORSDomainFlag.Name))
|
||||||
|
|
@ -1012,6 +1015,7 @@ func setHTTP(ctx *cli.Context, cfg *node.Config) {
|
||||||
|
|
||||||
if ctx.GlobalIsSet(RPCLegacyApiFlag.Name) {
|
if ctx.GlobalIsSet(RPCLegacyApiFlag.Name) {
|
||||||
cfg.HTTPModules = splitAndTrim(ctx.GlobalString(RPCLegacyApiFlag.Name))
|
cfg.HTTPModules = splitAndTrim(ctx.GlobalString(RPCLegacyApiFlag.Name))
|
||||||
|
log.Warn("The flag --rpcapi is deprecated and will be removed in the future, please use --http.api")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(HTTPApiFlag.Name) {
|
if ctx.GlobalIsSet(HTTPApiFlag.Name) {
|
||||||
cfg.HTTPModules = splitAndTrim(ctx.GlobalString(HTTPApiFlag.Name))
|
cfg.HTTPModules = splitAndTrim(ctx.GlobalString(HTTPApiFlag.Name))
|
||||||
|
|
@ -1019,6 +1023,7 @@ func setHTTP(ctx *cli.Context, cfg *node.Config) {
|
||||||
|
|
||||||
if ctx.GlobalIsSet(RPCLegacyVirtualHostsFlag.Name) {
|
if ctx.GlobalIsSet(RPCLegacyVirtualHostsFlag.Name) {
|
||||||
cfg.HTTPVirtualHosts = splitAndTrim(ctx.GlobalString(RPCLegacyVirtualHostsFlag.Name))
|
cfg.HTTPVirtualHosts = splitAndTrim(ctx.GlobalString(RPCLegacyVirtualHostsFlag.Name))
|
||||||
|
log.Warn("The flag --rpcvhosts is deprecated and will be removed in the future, please use --http.vhosts")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(HTTPVirtualHostsFlag.Name) {
|
if ctx.GlobalIsSet(HTTPVirtualHostsFlag.Name) {
|
||||||
cfg.HTTPVirtualHosts = splitAndTrim(ctx.GlobalString(HTTPVirtualHostsFlag.Name))
|
cfg.HTTPVirtualHosts = splitAndTrim(ctx.GlobalString(HTTPVirtualHostsFlag.Name))
|
||||||
|
|
@ -1050,6 +1055,7 @@ func setWS(ctx *cli.Context, cfg *node.Config) {
|
||||||
cfg.WSHost = "127.0.0.1"
|
cfg.WSHost = "127.0.0.1"
|
||||||
if ctx.GlobalIsSet(WSLegacyListenAddrFlag.Name) {
|
if ctx.GlobalIsSet(WSLegacyListenAddrFlag.Name) {
|
||||||
cfg.WSHost = ctx.GlobalString(WSLegacyListenAddrFlag.Name)
|
cfg.WSHost = ctx.GlobalString(WSLegacyListenAddrFlag.Name)
|
||||||
|
log.Warn("The flag --wsaddr is deprecated and will be removed in the future, please use --ws.addr")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(WSListenAddrFlag.Name) {
|
if ctx.GlobalIsSet(WSListenAddrFlag.Name) {
|
||||||
cfg.WSHost = ctx.GlobalString(WSListenAddrFlag.Name)
|
cfg.WSHost = ctx.GlobalString(WSListenAddrFlag.Name)
|
||||||
|
|
@ -1057,6 +1063,7 @@ func setWS(ctx *cli.Context, cfg *node.Config) {
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(WSLegacyPortFlag.Name) {
|
if ctx.GlobalIsSet(WSLegacyPortFlag.Name) {
|
||||||
cfg.WSPort = ctx.GlobalInt(WSLegacyPortFlag.Name)
|
cfg.WSPort = ctx.GlobalInt(WSLegacyPortFlag.Name)
|
||||||
|
log.Warn("The flag --wsport is deprecated and will be removed in the future, please use --ws.port")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(WSPortFlag.Name) {
|
if ctx.GlobalIsSet(WSPortFlag.Name) {
|
||||||
cfg.WSPort = ctx.GlobalInt(WSPortFlag.Name)
|
cfg.WSPort = ctx.GlobalInt(WSPortFlag.Name)
|
||||||
|
|
@ -1064,6 +1071,7 @@ func setWS(ctx *cli.Context, cfg *node.Config) {
|
||||||
|
|
||||||
if ctx.GlobalIsSet(WSLegacyAllowedOriginsFlag.Name) {
|
if ctx.GlobalIsSet(WSLegacyAllowedOriginsFlag.Name) {
|
||||||
cfg.WSOrigins = splitAndTrim(ctx.GlobalString(WSLegacyAllowedOriginsFlag.Name))
|
cfg.WSOrigins = splitAndTrim(ctx.GlobalString(WSLegacyAllowedOriginsFlag.Name))
|
||||||
|
log.Warn("The flag --wsorigins is deprecated and will be removed in the future, please use --ws.origins")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(WSAllowedOriginsFlag.Name) {
|
if ctx.GlobalIsSet(WSAllowedOriginsFlag.Name) {
|
||||||
cfg.WSOrigins = splitAndTrim(ctx.GlobalString(WSAllowedOriginsFlag.Name))
|
cfg.WSOrigins = splitAndTrim(ctx.GlobalString(WSAllowedOriginsFlag.Name))
|
||||||
|
|
@ -1071,6 +1079,7 @@ func setWS(ctx *cli.Context, cfg *node.Config) {
|
||||||
|
|
||||||
if ctx.GlobalIsSet(WSLegacyApiFlag.Name) {
|
if ctx.GlobalIsSet(WSLegacyApiFlag.Name) {
|
||||||
cfg.WSModules = splitAndTrim(ctx.GlobalString(WSLegacyApiFlag.Name))
|
cfg.WSModules = splitAndTrim(ctx.GlobalString(WSLegacyApiFlag.Name))
|
||||||
|
log.Warn("The flag --wsapi is deprecated and will be removed in the future, please use --ws.api")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(WSApiFlag.Name) {
|
if ctx.GlobalIsSet(WSApiFlag.Name) {
|
||||||
cfg.WSModules = splitAndTrim(ctx.GlobalString(WSApiFlag.Name))
|
cfg.WSModules = splitAndTrim(ctx.GlobalString(WSApiFlag.Name))
|
||||||
|
|
@ -1356,6 +1365,7 @@ func setDataDir(ctx *cli.Context, cfg *node.Config) {
|
||||||
func setGPO(ctx *cli.Context, cfg *gasprice.Config) {
|
func setGPO(ctx *cli.Context, cfg *gasprice.Config) {
|
||||||
if ctx.GlobalIsSet(GpoLegacyBlocksFlag.Name) {
|
if ctx.GlobalIsSet(GpoLegacyBlocksFlag.Name) {
|
||||||
cfg.Blocks = ctx.GlobalInt(GpoLegacyBlocksFlag.Name)
|
cfg.Blocks = ctx.GlobalInt(GpoLegacyBlocksFlag.Name)
|
||||||
|
log.Warn("The flag --gpoblocks is deprecated and will be removed in the future, please use --gpo.blocks")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(GpoBlocksFlag.Name) {
|
if ctx.GlobalIsSet(GpoBlocksFlag.Name) {
|
||||||
cfg.Blocks = ctx.GlobalInt(GpoBlocksFlag.Name)
|
cfg.Blocks = ctx.GlobalInt(GpoBlocksFlag.Name)
|
||||||
|
|
@ -1363,6 +1373,7 @@ func setGPO(ctx *cli.Context, cfg *gasprice.Config) {
|
||||||
|
|
||||||
if ctx.GlobalIsSet(GpoLegacyPercentileFlag.Name) {
|
if ctx.GlobalIsSet(GpoLegacyPercentileFlag.Name) {
|
||||||
cfg.Percentile = ctx.GlobalInt(GpoLegacyPercentileFlag.Name)
|
cfg.Percentile = ctx.GlobalInt(GpoLegacyPercentileFlag.Name)
|
||||||
|
log.Warn("The flag --gpopercentile is deprecated and will be removed in the future, please use --gpo.percentile")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(GpoPercentileFlag.Name) {
|
if ctx.GlobalIsSet(GpoPercentileFlag.Name) {
|
||||||
cfg.Percentile = ctx.GlobalInt(GpoPercentileFlag.Name)
|
cfg.Percentile = ctx.GlobalInt(GpoPercentileFlag.Name)
|
||||||
|
|
|
||||||
|
|
@ -150,11 +150,13 @@ func Setup(ctx *cli.Context) error {
|
||||||
// profiling, tracing
|
// profiling, tracing
|
||||||
if ctx.GlobalIsSet(memprofilerateLegacyFlag.Name) {
|
if ctx.GlobalIsSet(memprofilerateLegacyFlag.Name) {
|
||||||
runtime.MemProfileRate = ctx.GlobalInt(memprofilerateLegacyFlag.Name)
|
runtime.MemProfileRate = ctx.GlobalInt(memprofilerateLegacyFlag.Name)
|
||||||
|
log.Warn("The flag --memprofilerate is deprecated and will be removed in the future, please use --pprof.memprofilerate")
|
||||||
}
|
}
|
||||||
runtime.MemProfileRate = ctx.GlobalInt(memprofilerateFlag.Name)
|
runtime.MemProfileRate = ctx.GlobalInt(memprofilerateFlag.Name)
|
||||||
|
|
||||||
if ctx.GlobalIsSet(blockprofilerateLegacyFlag.Name) {
|
if ctx.GlobalIsSet(blockprofilerateLegacyFlag.Name) {
|
||||||
Handler.SetBlockProfileRate(ctx.GlobalInt(blockprofilerateLegacyFlag.Name))
|
Handler.SetBlockProfileRate(ctx.GlobalInt(blockprofilerateLegacyFlag.Name))
|
||||||
|
log.Warn("The flag --blockprofilerate is deprecated and will be removed in the future, please use --pprof.blockprofilerate")
|
||||||
}
|
}
|
||||||
Handler.SetBlockProfileRate(ctx.GlobalInt(blockprofilerateFlag.Name))
|
Handler.SetBlockProfileRate(ctx.GlobalInt(blockprofilerateFlag.Name))
|
||||||
|
|
||||||
|
|
@ -170,6 +172,7 @@ func Setup(ctx *cli.Context) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if cpuFile := ctx.GlobalString(cpuprofileLegacyFlag.Name); cpuFile != "" {
|
if cpuFile := ctx.GlobalString(cpuprofileLegacyFlag.Name); cpuFile != "" {
|
||||||
|
log.Warn("The flag --cpuprofile is deprecated and will be removed in the future, please use --pprof.cpuprofile")
|
||||||
if err := Handler.StartCPUProfile(cpuFile); err != nil {
|
if err := Handler.StartCPUProfile(cpuFile); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
@ -180,11 +183,13 @@ func Setup(ctx *cli.Context) error {
|
||||||
listenHost := ctx.GlobalString(pprofAddrFlag.Name)
|
listenHost := ctx.GlobalString(pprofAddrFlag.Name)
|
||||||
if ctx.GlobalIsSet(pprofLegacyAddrFlag.Name) && !ctx.GlobalIsSet(pprofAddrFlag.Name) {
|
if ctx.GlobalIsSet(pprofLegacyAddrFlag.Name) && !ctx.GlobalIsSet(pprofAddrFlag.Name) {
|
||||||
listenHost = ctx.GlobalString(pprofLegacyAddrFlag.Name)
|
listenHost = ctx.GlobalString(pprofLegacyAddrFlag.Name)
|
||||||
|
log.Warn("The flag --pprofaddr is deprecated and will be removed in the future, please use --pprof.addr")
|
||||||
}
|
}
|
||||||
|
|
||||||
port := ctx.GlobalInt(pprofPortFlag.Name)
|
port := ctx.GlobalInt(pprofPortFlag.Name)
|
||||||
if ctx.GlobalIsSet(pprofLegacyPortFlag.Name) && !ctx.GlobalIsSet(pprofPortFlag.Name) {
|
if ctx.GlobalIsSet(pprofLegacyPortFlag.Name) && !ctx.GlobalIsSet(pprofPortFlag.Name) {
|
||||||
port = ctx.GlobalInt(pprofLegacyPortFlag.Name)
|
port = ctx.GlobalInt(pprofLegacyPortFlag.Name)
|
||||||
|
log.Warn("The flag --pprofport is deprecated and will be removed in the future, please use --pprof.port")
|
||||||
}
|
}
|
||||||
|
|
||||||
address := fmt.Sprintf("%s:%d", listenHost, port)
|
address := fmt.Sprintf("%s:%d", listenHost, port)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue