@@ -39,7 +39,7 @@ func (lm *loggingMiddleware) Publish(ctx context.Context, key string, msg *messa
39
39
}
40
40
if err != nil {
41
41
args = append (args , slog .Any ("error" , err ))
42
- lm .logger .Error ( "Publish message failed to complete successfully" , args ... )
42
+ lm .logger .ErrorContext ( ctx , "Publish message failed to complete successfully" , args ... )
43
43
return
44
44
}
45
45
lm .logger .Info ("Publish message completed successfully" , args ... )
@@ -61,7 +61,7 @@ func (lm *loggingMiddleware) Subscribe(ctx context.Context, key, chanID, subtopi
61
61
}
62
62
if err != nil {
63
63
args = append (args , slog .Any ("error" , err ))
64
- lm .logger .Error ( "Subscribe failed to complete successfully" , args ... )
64
+ lm .logger .ErrorContext ( ctx , "Subscribe failed to complete successfully" , args ... )
65
65
return
66
66
}
67
67
lm .logger .Info ("Subscribe completed successfully" , args ... )
@@ -83,7 +83,7 @@ func (lm *loggingMiddleware) Unsubscribe(ctx context.Context, key, chanID, subto
83
83
}
84
84
if err != nil {
85
85
args = append (args , slog .Any ("error" , err ))
86
- lm .logger .Error ( "Unsubscribe failed to complete successfully" , args ... )
86
+ lm .logger .ErrorContext ( ctx , "Unsubscribe failed to complete successfully" , args ... )
87
87
return
88
88
}
89
89
lm .logger .Info ("Unsubscribe completed successfully" , args ... )
0 commit comments