[#240] logs: Factor out common service log messages
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
0e31c12e63
commit
cffcc7745e
15 changed files with 53 additions and 64 deletions
|
@ -27,7 +27,7 @@ func (np *Processor) HandleNewEpochTick(ev event.Event) {
|
|||
|
||||
func (np *Processor) handleNewEpoch(ev event.Event) {
|
||||
epochEvent := ev.(netmapEvent.NewEpoch)
|
||||
np.log.Info(logs.NetmapNotification,
|
||||
np.log.Info(logs.Notification,
|
||||
zap.String("type", "new epoch"),
|
||||
zap.Uint64("value", epochEvent.EpochNumber()))
|
||||
|
||||
|
@ -46,7 +46,7 @@ func (np *Processor) handleNewEpoch(ev event.Event) {
|
|||
func (np *Processor) handleAddPeer(ev event.Event) {
|
||||
newPeer := ev.(netmapEvent.AddPeer)
|
||||
|
||||
np.log.Info(logs.NetmapNotification,
|
||||
np.log.Info(logs.Notification,
|
||||
zap.String("type", "add peer"),
|
||||
)
|
||||
|
||||
|
@ -64,7 +64,7 @@ func (np *Processor) handleAddPeer(ev event.Event) {
|
|||
|
||||
func (np *Processor) handleUpdateState(ev event.Event) {
|
||||
updPeer := ev.(netmapEvent.UpdatePeer)
|
||||
np.log.Info(logs.NetmapNotification,
|
||||
np.log.Info(logs.Notification,
|
||||
zap.String("type", "update peer state"),
|
||||
zap.String("key", hex.EncodeToString(updPeer.PublicKey().Bytes())))
|
||||
|
||||
|
@ -105,7 +105,7 @@ func (np *Processor) handleCleanupTick(ev event.Event) {
|
|||
func (np *Processor) handleRemoveNode(ev event.Event) {
|
||||
removeNode := ev.(subnetevents.RemoveNode)
|
||||
|
||||
np.log.Info(logs.NetmapNotification,
|
||||
np.log.Info(logs.Notification,
|
||||
zap.String("type", "remove node from subnet"),
|
||||
zap.String("subnetID", hex.EncodeToString(removeNode.SubnetworkID())),
|
||||
zap.String("key", hex.EncodeToString(removeNode.Node())),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue