modified logging API

- package vars for tagged loggers
- weed out spurious fmt.PrintX and log.PrintX logging
- tried to second guess loglevel for some :)
This commit is contained in:
zelig
2014-06-23 12:54:10 +01:00
parent 8e9cc36979
commit b9e8a3e024
13 changed files with 132 additions and 111 deletions

View File

@ -4,11 +4,14 @@ import (
"encoding/hex"
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/eth-go/ethlog"
"math/big"
"strings"
"sync/atomic"
)
var logger = ethlog.NewLogger("PUB")
type PEthereum struct {
manager ethchain.EthManager
stateManager *ethchain.StateManager
@ -191,7 +194,7 @@ func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, sc
lib.txPool.QueueTransaction(tx)
if contractCreation {
ethutil.Config.Log.Infof("Contract addr %x", tx.CreationAddress())
logger.Infof("Contract addr %x", tx.CreationAddress())
}
return NewPReciept(contractCreation, tx.CreationAddress(), tx.Hash(), keyPair.Address()), nil