Skip to content

Commit

Permalink
Merge pull request #771 from FactomProject/FD-1069_runtimelog_honoring
Browse files Browse the repository at this point in the history
Fd 1069 runtimelog honoring
  • Loading branch information
Emyrk committed Jun 19, 2019
2 parents c8c2408 + d335a31 commit 662a1f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions engine/MsgLogging.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ func (m *MsgLog) Init(enable bool, nodecnt int) {
}

func (m *MsgLog) Add2(fnode *FactomNode, out bool, peer string, where string, valid bool, msg interfaces.IMsg) {
if !m.Enable {
return
}
m.sem.Lock()
defer m.sem.Unlock()
now := fnode.State.GetTimestamp()
Expand Down Expand Up @@ -98,6 +101,10 @@ func (m *MsgLog) Add2(fnode *FactomNode, out bool, peer string, where string, va
}

func (m *MsgLog) PrtMsgs(state interfaces.IState) {
if !m.Enable {
fmt.Println("Message log is not enabled. Run factomd with runtime log enabled.")
return
}
m.sem.Lock()
defer m.sem.Unlock()

Expand Down

0 comments on commit 662a1f2

Please sign in to comment.