mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-04 15:27:55 +07:00
style: beautify log
This commit is contained in:
@ -138,8 +138,9 @@ func (a *AliveDialerSet) NotifyLatencyChange(dialer *Dialer, alive bool) {
|
||||
// Dialer: not alive -> alive.
|
||||
if index == -NotAlive {
|
||||
a.log.WithFields(logrus.Fields{
|
||||
"group": a.dialerGroupName,
|
||||
}).Infof("[NOT ALIVE --%v-> ALIVE] %v", a.CheckTyp.String(), dialer.property.Name)
|
||||
"dialer": dialer.property.Name,
|
||||
"group": a.dialerGroupName,
|
||||
}).Infof("[NOT ALIVE --%v-> ALIVE]", a.CheckTyp.String())
|
||||
}
|
||||
a.dialerToIndex[dialer] = len(a.inorderedAliveDialerSet)
|
||||
a.inorderedAliveDialerSet = append(a.inorderedAliveDialerSet, dialer)
|
||||
@ -149,8 +150,9 @@ func (a *AliveDialerSet) NotifyLatencyChange(dialer *Dialer, alive bool) {
|
||||
if index >= 0 {
|
||||
// Dialer: alive -> not alive.
|
||||
a.log.WithFields(logrus.Fields{
|
||||
"group": a.dialerGroupName,
|
||||
}).Infof("[ALIVE --%v-> NOT ALIVE] %v", a.CheckTyp.String(), dialer.property.Name)
|
||||
"dialer": dialer.property.Name,
|
||||
"group": a.dialerGroupName,
|
||||
}).Infof("[ALIVE --%v-> NOT ALIVE]", a.CheckTyp.String())
|
||||
// Remove the dialer from inorderedAliveDialerSet.
|
||||
if index >= len(a.inorderedAliveDialerSet) {
|
||||
a.log.Panicf("index:%v >= len(a.inorderedAliveDialerSet):%v", index, len(a.inorderedAliveDialerSet))
|
||||
|
Reference in New Issue
Block a user