Skip to content

Commit

Permalink
Add key to logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkleeman committed Jul 8, 2024
1 parent 990bf71 commit 149b38e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/state/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ func (c *serviceCall) Send(body any, delay time.Duration) error {
}

func (m *Machine) doDynCall(service, key, method string, input, output any) error {
m.log.Debug().Str("service", service).Str("method", method).Msg("in do call")

params, err := json.Marshal(input)
if err != nil {
return err
Expand All @@ -73,6 +71,8 @@ func (m *Machine) doDynCall(service, key, method string, input, output any) erro
}

func (m *Machine) doCall(service, key, method string, params []byte) ([]byte, error) {
m.log.Debug().Str("service", service).Str("method", method).Str("key", key).Msg("executing sync call")

return replayOrNew(
m,
wire.CallEntryMessageType,
Expand Down Expand Up @@ -133,6 +133,8 @@ func (m *Machine) _doCall(service, key, method string, params []byte) ([]byte, e
}

func (c *Machine) sendCall(service, method, key string, body any, delay time.Duration) error {
c.log.Debug().Str("service", service).Str("method", method).Str("key", key).Msg("executing async call")

params, err := json.Marshal(body)
if err != nil {
return err
Expand Down

0 comments on commit 149b38e

Please sign in to comment.