log webservice request/response

2
Is there an easy way to log the request/response when calling from Mx-app to an external webservice? If not what is the best practice to do this?
asked
1 answers
3

Set the webservices lognode to "trace". Note that there are costs involved, performance won't be what you'd expect. In other words, don't enable trace in production.

The reason for this is that it buffers the entire soap message in memory (it normally streams the calls directly to wherever it's supposed to go, database, external etc), which can be quite costly if the messages get big. For small messages this might be acceptable (up to a couple of KB it won't hurt too much) but for larger messages this can easily bog the entire system down.

I'm curious though, why would you need trace logging in production? I can see why you'd want to tracelog everything in development when you're trying to figure out what's going on, but I'd expect you to only need domain model level logging while in production.

answered