@@ -65,8 +65,8 @@ func (sm *SubscriptionManager) Subscribe(address common.Address, topic common.Ha
6565
6666 sm .logger .Info ().
6767 Int64 ("ChainID" , sm .chainID ).
68- Hex ("Address" , [] byte ( address .Hex () )).
69- Hex ("Topic" , [] byte ( topic .Hex () )).
68+ Str ("Address" , address .Hex ()).
69+ Str ("Topic" , topic .Hex ()).
7070 Int64 ("SubscriberCount" , int64 (len (sm .registry [eventKey ]))).
7171 Msg ("New subscription added" )
7272
@@ -82,8 +82,8 @@ func (sm *SubscriptionManager) Unsubscribe(address common.Address, topic common.
8282 if ! exists {
8383 sm .logger .Warn ().
8484 Int64 ("ChainID" , sm .chainID ).
85- Hex ("Address" , [] byte ( address .Hex () )).
86- Hex ("Topic" , [] byte ( topic .Hex () )).
85+ Str ("Address" , address .Hex ()).
86+ Str ("Topic" , topic .Hex ()).
8787 Msg ("Attempted to unsubscribe from a non-existent EventKey" )
8888 return errors .New ("event key does not exist" )
8989 }
@@ -99,8 +99,8 @@ func (sm *SubscriptionManager) Unsubscribe(address common.Address, topic common.
9999 sm .mu .Unlock ()
100100 sm .logger .Info ().
101101 Int64 ("ChainID" , sm .chainID ).
102- Hex ("Address" , [] byte ( address .Hex () )).
103- Hex ("Topic" , [] byte ( topic .Hex () )).
102+ Str ("Address" , address .Hex ()).
103+ Str ("Topic" , topic .Hex ()).
104104 Int64 ("RemainingSubscribers" , int64 (len (sm .registry [eventKey ]))).
105105 Msg ("Subscription removed" )
106106 found = true
@@ -124,8 +124,8 @@ func (sm *SubscriptionManager) Unsubscribe(address common.Address, topic common.
124124 delete (sm .registry , eventKey )
125125 sm .logger .Debug ().
126126 Int64 ("ChainID" , sm .chainID ).
127- Hex ("Address" , [] byte ( address .Hex () )).
128- Hex ("Topic" , [] byte ( topic .Hex () )).
127+ Str ("Address" , address .Hex ()).
128+ Str ("Topic" , topic .Hex ()).
129129 Msg ("No remaining subscribers, removing EventKey from registry" )
130130 }
131131 sm .mu .Unlock ()
@@ -173,8 +173,8 @@ func (sm *SubscriptionManager) BroadcastLog(eventKey internal.EventKey, log api.
173173 sm .logger .Debug ().
174174 Int64 ("ChainID" , sm .chainID ).
175175 Int ("Subscribers" , len (subscribers )).
176- Hex ("Address" , [] byte ( eventKey .Address .Hex () )).
177- Hex ("Topic" , [] byte ( eventKey .Topic .Hex () )).
176+ Str ("Address" , eventKey .Address .Hex ()).
177+ Str ("Topic" , eventKey .Topic .Hex ()).
178178 Msg ("Log broadcasted to all subscribers" )
179179}
180180
0 commit comments