diff options
author | zelig <viktor.tron@gmail.com> | 2014-06-23 19:54:10 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-06-23 19:54:10 +0800 |
commit | b9e8a3e02493d5bbf23cfcab259e66f6ae166612 (patch) | |
tree | 63a13e2d4bfb3daf0a9b06b32b8ef8b849556781 /ethchain/state_object.go | |
parent | 8e9cc3697944c3e568186a5c23ac729f6eb4a1f4 (diff) | |
download | dexon-b9e8a3e02493d5bbf23cfcab259e66f6ae166612.tar.gz dexon-b9e8a3e02493d5bbf23cfcab259e66f6ae166612.tar.zst dexon-b9e8a3e02493d5bbf23cfcab259e66f6ae166612.zip |
modified logging API
- package vars for tagged loggers
- weed out spurious fmt.PrintX and log.PrintX logging
- tried to second guess loglevel for some :)
Diffstat (limited to 'ethchain/state_object.go')
-rw-r--r-- | ethchain/state_object.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ethchain/state_object.go b/ethchain/state_object.go index 5b64c3b37..f53f47d7e 100644 --- a/ethchain/state_object.go +++ b/ethchain/state_object.go @@ -124,13 +124,13 @@ func (c *StateObject) ReturnGas(gas, price *big.Int, state *State) { func (c *StateObject) AddAmount(amount *big.Int) { c.SetAmount(new(big.Int).Add(c.Amount, amount)) - ethutil.Config.Log.Printf(ethutil.LogLevelInfo, "%x: #%d %v (+ %v)\n", c.Address(), c.Nonce, c.Amount, amount) + statelogger.Infof("%x: #%d %v (+ %v)\n", c.Address(), c.Nonce, c.Amount, amount) } func (c *StateObject) SubAmount(amount *big.Int) { c.SetAmount(new(big.Int).Sub(c.Amount, amount)) - ethutil.Config.Log.Printf(ethutil.LogLevelInfo, "%x: #%d %v (- %v)\n", c.Address(), c.Nonce, c.Amount, amount) + statelogger.Infof("%x: #%d %v (- %v)\n", c.Address(), c.Nonce, c.Amount, amount) } func (c *StateObject) SetAmount(amount *big.Int) { @@ -151,7 +151,7 @@ func (c *StateObject) ConvertGas(gas, price *big.Int) error { func (self *StateObject) SetGasPool(gasLimit *big.Int) { self.gasPool = new(big.Int).Set(gasLimit) - ethutil.Config.Log.Printf(ethutil.LogLevelSystem, "%x: fuel (+ %v)", self.Address(), self.gasPool) + statelogger.Infof("%x: fuel (+ %v)", self.Address(), self.gasPool) } func (self *StateObject) BuyGas(gas, price *big.Int) error { |