aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum/javascript_runtime.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2014-06-23 18:39:09 +0800
committerzelig <viktor.tron@gmail.com>2014-06-23 18:39:09 +0800
commit7bcf875c577cd9710d27dd4511ae21aa62067d79 (patch)
tree1a2ed315b563bb719ab427b49c4f828035055734 /ethereum/javascript_runtime.go
parentf90001e938ce34457cc0ed5822c8e7dff52ec58c (diff)
downloaddexon-7bcf875c577cd9710d27dd4511ae21aa62067d79.tar
dexon-7bcf875c577cd9710d27dd4511ae21aa62067d79.tar.gz
dexon-7bcf875c577cd9710d27dd4511ae21aa62067d79.tar.bz2
dexon-7bcf875c577cd9710d27dd4511ae21aa62067d79.tar.lz
dexon-7bcf875c577cd9710d27dd4511ae21aa62067d79.tar.xz
dexon-7bcf875c577cd9710d27dd4511ae21aa62067d79.tar.zst
dexon-7bcf875c577cd9710d27dd4511ae21aa62067d79.zip
add logging for jsre
Diffstat (limited to 'ethereum/javascript_runtime.go')
-rw-r--r--ethereum/javascript_runtime.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/ethereum/javascript_runtime.go b/ethereum/javascript_runtime.go
index b05d39232..34b805e7f 100644
--- a/ethereum/javascript_runtime.go
+++ b/ethereum/javascript_runtime.go
@@ -6,6 +6,7 @@ import (
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethpub"
"github.com/ethereum/eth-go/ethutil"
+ "github.com/ethereum/eth-go/ethlog"
"github.com/ethereum/go-ethereum/utils"
"github.com/obscuren/otto"
"io/ioutil"
@@ -14,6 +15,8 @@ import (
"path/filepath"
)
+var jsrelogger = ethlog.NewLogger("JSRE")
+
type JSRE struct {
ethereum *eth.Ethereum
vm *otto.Otto
@@ -31,7 +34,7 @@ func (jsre *JSRE) LoadExtFile(path string) {
if err == nil {
jsre.vm.Run(result)
} else {
- ethutil.Config.Log.Debugln("Could not load file:", path)
+ jsrelogger.Debugln("Could not load file:", path)
}
}
@@ -65,6 +68,8 @@ func NewJSRE(ethereum *eth.Ethereum) *JSRE {
re.initStdFuncs()
+ jsrelogger.Infoln("started")
+
return re
}
@@ -99,6 +104,7 @@ func (self *JSRE) Stop() {
close(self.blockChan)
close(self.quitChan)
close(self.changeChan)
+ jsrelogger.Infoln("stopped")
}
func (self *JSRE) mainLoop() {