aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-01-26 06:35:25 +0800
committerFelix Lange <fjl@twurst.com>2016-01-26 06:35:25 +0800
commitf2ab351e8d3b0a4e569ce56f6a4f17725ca5ba65 (patch)
tree424c1067530fd4013234983549b03b42aa994db2 /rpc
parent6e6931ef73c68d1a8ae45475f7719bdc962cb2c1 (diff)
parente4d794851b713b5a22147c570963ff76ec26c7d0 (diff)
downloaddexon-f2ab351e8d3b0a4e569ce56f6a4f17725ca5ba65.tar.gz
dexon-f2ab351e8d3b0a4e569ce56f6a4f17725ca5ba65.tar.zst
dexon-f2ab351e8d3b0a4e569ce56f6a4f17725ca5ba65.zip
Merge pull request #2136 from fjl/glog-prefix
logger/glog: improve vmodule
Diffstat (limited to 'rpc')
-rw-r--r--rpc/api/admin.go12
-rw-r--r--rpc/api/admin_args.go22
-rw-r--r--rpc/api/admin_js.go6
-rw-r--r--rpc/api/debug_js.go14
4 files changed, 13 insertions, 41 deletions
diff --git a/rpc/api/admin.go b/rpc/api/admin.go
index 1133c9bca..daf2f31b4 100644
--- a/rpc/api/admin.go
+++ b/rpc/api/admin.go
@@ -31,7 +31,6 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/eth"
- "github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/p2p/discover"
"github.com/ethereum/go-ethereum/rlp"
@@ -55,7 +54,6 @@ var (
"admin_nodeInfo": (*adminApi).NodeInfo,
"admin_exportChain": (*adminApi).ExportChain,
"admin_importChain": (*adminApi).ImportChain,
- "admin_verbosity": (*adminApi).Verbosity,
"admin_setSolc": (*adminApi).SetSolc,
"admin_datadir": (*adminApi).DataDir,
"admin_startRPC": (*adminApi).StartRPC,
@@ -225,16 +223,6 @@ func (self *adminApi) ExportChain(req *shared.Request) (interface{}, error) {
return true, nil
}
-func (self *adminApi) Verbosity(req *shared.Request) (interface{}, error) {
- args := new(VerbosityArgs)
- if err := self.coder.Decode(req.Params, &args); err != nil {
- return nil, shared.NewDecodeParamError(err.Error())
- }
-
- glog.SetV(args.Level)
- return true, nil
-}
-
func (self *adminApi) SetSolc(req *shared.Request) (interface{}, error) {
args := new(SetSolcArgs)
if err := self.coder.Decode(req.Params, &args); err != nil {
diff --git a/rpc/api/admin_args.go b/rpc/api/admin_args.go
index e3a2f72bf..e09597ad4 100644
--- a/rpc/api/admin_args.go
+++ b/rpc/api/admin_args.go
@@ -69,28 +69,6 @@ func (args *ImportExportChainArgs) UnmarshalJSON(b []byte) (err error) {
return nil
}
-type VerbosityArgs struct {
- Level int
-}
-
-func (args *VerbosityArgs) UnmarshalJSON(b []byte) (err error) {
- var obj []interface{}
- if err := json.Unmarshal(b, &obj); err != nil {
- return shared.NewDecodeParamError(err.Error())
- }
-
- if len(obj) != 1 {
- return shared.NewDecodeParamError("Expected enode as argument")
- }
-
- level, err := numString(obj[0])
- if err == nil {
- args.Level = int(level.Int64())
- }
-
- return nil
-}
-
type SetSolcArgs struct {
Path string
}
diff --git a/rpc/api/admin_js.go b/rpc/api/admin_js.go
index 413ea8d47..e6171cc74 100644
--- a/rpc/api/admin_js.go
+++ b/rpc/api/admin_js.go
@@ -46,12 +46,6 @@ web3._extend({
inputFormatter: [null, null]
}),
new web3._extend.Method({
- name: 'verbosity',
- call: 'admin_verbosity',
- params: 1,
- inputFormatter: [web3._extend.utils.fromDecimal]
- }),
- new web3._extend.Method({
name: 'setSolc',
call: 'admin_setSolc',
params: 1,
diff --git a/rpc/api/debug_js.go b/rpc/api/debug_js.go
index 03755ada0..030511add 100644
--- a/rpc/api/debug_js.go
+++ b/rpc/api/debug_js.go
@@ -62,7 +62,19 @@ web3._extend({
call: 'debug_metrics',
params: 1,
inputFormatter: [null]
- })
+ }),
+ new web3._extend.Method({
+ name: 'verbosity',
+ call: 'debug_verbosity',
+ params: 1,
+ inputFormatter: [web3._extend.utils.fromDecimal]
+ }),
+ new web3._extend.Method({
+ name: 'vmodule',
+ call: 'debug_vmodule',
+ params: 1,
+ inputFormatter: [null]
+ }),
],
properties:
[