rename debugLog->debugLogf

This commit is contained in:
fiatjaf
2023-07-11 15:25:02 -03:00
parent c03c028142
commit 6cee628149
5 changed files with 9 additions and 8 deletions

View File

@ -240,7 +240,7 @@ func (r *Relay) Connect(ctx context.Context) error {
break
}
debugLog("{%s} %v\n", r.URL, message)
debugLogf("{%s} %v\n", r.URL, message)
envelope := ParseMessage(message)
if envelope == nil {
@ -370,7 +370,7 @@ func (r *Relay) Publish(ctx context.Context, event Event) (Status, error) {
// publish event
envb, _ := EventEnvelope{Event: event}.MarshalJSON()
debugLog("{%s} sending %v\n", r.URL, envb)
debugLogf("{%s} sending %v\n", r.URL, envb)
status = PublishStatusSent
if err := <-r.Write(envb); err != nil {
status = PublishStatusFailed
@ -434,7 +434,7 @@ func (r *Relay) Auth(ctx context.Context, event Event) (Status, error) {
// send AUTH
authResponse, _ := AuthEnvelope{Event: event}.MarshalJSON()
debugLog("{%s} sending %v\n", r.URL, authResponse)
debugLogf("{%s} sending %v\n", r.URL, authResponse)
if err := <-r.Write(authResponse); err != nil {
// status will be "failed"
return status, err