Skip to content

Commit db24fb7

Browse files
committed
Move standard fields to LogEvent
1 parent 3d6fd60 commit db24fb7

4 files changed

Lines changed: 151 additions & 173 deletions

File tree

‎eth/backend.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ func (s *Ethereum) MaxPeers() int {
224224
func (s *Ethereum) Start(seed bool) error {
225225
jsonlogger.LogJson(&ethlogger.LogStarting{
226226
ClientString: s.ClientIdentity().String(),
227-
Guid: ethutil.Bytes2Hex(s.ClientIdentity().Pubkey()),
228227
Coinbase: ethutil.Bytes2Hex(s.KeyManager().Address()),
229228
ProtocolVersion: ProtocolVersion,
229+
LogEvent: ethlogger.LogEvent{Guid: ethutil.Bytes2Hex(s.ClientIdentity().Pubkey())},
230230
})
231231

232232
err := s.net.Start()

‎logger/loggers.go‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,15 @@ func (logger *Logger) Fatalf(format string, v ...interface{}) {
114114
os.Exit(0)
115115
}
116116

117-
type JsonLogger struct{}
117+
type JsonLogger struct {
118+
Coinbase string
119+
}
118120

119121
func NewJsonLogger() *JsonLogger {
120122
return &JsonLogger{}
121123
}
122124

123-
func (logger *JsonLogger) LogJson(v LogEvent) {
125+
func (logger *JsonLogger) LogJson(v JsonLog) {
124126
msgname := v.EventName()
125127
obj := map[string]interface{}{
126128
msgname: v,

0 commit comments

Comments
 (0)