diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-04 19:24:19 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-04 19:24:19 +0800 |
commit | c20d04ca675115bac1422c813212bb7244e32c62 (patch) | |
tree | a07fda7c55202bc88655a8372aba5ee09997602b /cmd/geth/admin.go | |
parent | 1889727144008273e9dcd491dce6672126c37652 (diff) | |
download | dexon-c20d04ca675115bac1422c813212bb7244e32c62.tar dexon-c20d04ca675115bac1422c813212bb7244e32c62.tar.gz dexon-c20d04ca675115bac1422c813212bb7244e32c62.tar.bz2 dexon-c20d04ca675115bac1422c813212bb7244e32c62.tar.lz dexon-c20d04ca675115bac1422c813212bb7244e32c62.tar.xz dexon-c20d04ca675115bac1422c813212bb7244e32c62.tar.zst dexon-c20d04ca675115bac1422c813212bb7244e32c62.zip |
added verbosity to js admin
Diffstat (limited to 'cmd/geth/admin.go')
-rw-r--r-- | cmd/geth/admin.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go index b217e88b5..639d5283e 100644 --- a/cmd/geth/admin.go +++ b/cmd/geth/admin.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/xeth" @@ -34,6 +35,18 @@ func (js *jsre) adminBindings() { admin.Set("import", js.importChain) admin.Set("export", js.exportChain) admin.Set("dumpBlock", js.dumpBlock) + admin.Set("verbosity", js.verbosity) +} + +func (js *jsre) verbosity(call otto.FunctionCall) otto.Value { + v, err := call.Argument(0).ToInteger() + if err != nil { + fmt.Println(err) + return otto.UndefinedValue() + } + + glog.SetV(int(v)) + return otto.UndefinedValue() } func (js *jsre) startMining(call otto.FunctionCall) otto.Value { |