diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-01-22 00:57:29 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-01-22 00:57:29 +0800 |
commit | 1077109e1153cc4fb4eece59dd48cd9f640d0e0b (patch) | |
tree | 6a1c748702dfb5a78071d16c2185fca33b16aa42 /eth/backend.go | |
parent | ed7d7b405e1de8010f2ddeecf2b3798e2f07ad31 (diff) | |
download | dexon-1077109e1153cc4fb4eece59dd48cd9f640d0e0b.tar dexon-1077109e1153cc4fb4eece59dd48cd9f640d0e0b.tar.gz dexon-1077109e1153cc4fb4eece59dd48cd9f640d0e0b.tar.bz2 dexon-1077109e1153cc4fb4eece59dd48cd9f640d0e0b.tar.lz dexon-1077109e1153cc4fb4eece59dd48cd9f640d0e0b.tar.xz dexon-1077109e1153cc4fb4eece59dd48cd9f640d0e0b.tar.zst dexon-1077109e1153cc4fb4eece59dd48cd9f640d0e0b.zip |
Add JsonLogger type
Diffstat (limited to 'eth/backend.go')
-rw-r--r-- | eth/backend.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/eth/backend.go b/eth/backend.go index da75da051..c16727e1c 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -44,6 +44,7 @@ type Config struct { } var logger = ethlogger.NewLogger("SERV") +var jsonlogger = ethlogger.NewJsonLogger() type Ethereum struct { // Channel for shutting down the ethereum @@ -221,6 +222,14 @@ func (s *Ethereum) MaxPeers() int { // Start the ethereum func (s *Ethereum) Start(seed bool) error { + evd := map[string]interface{}{ + "version_string": s.ClientIdentity().String(), + "guid": ethutil.Bytes2Hex(s.ClientIdentity().Pubkey()), + "level": "debug", + "coinbase": ethutil.Bytes2Hex(s.KeyManager().Address()), + "eth_version": ProtocolVersion, + } + jsonlogger.Log("starting", evd) err := s.net.Start() if err != nil { return err |