0
votes

MarkLogic version : 9.0-6.2

While calling Marklogic API (HTTP PUT) through an external tool (informatica), we are getting status code 500. To be able to debug, we are looking for logs that would show the URI along with the payload being sent through PUT. We enabled 'Finest' on the 'system log level' and 'file log level' under 'Groups' in Admin console, but still seeing only the URI but not the input payload for the PUT request.

Any inputs on enabling the logs to display the input payload for the PUT/POST request?

1

1 Answers

4
votes

There is not an option to automatically log the body of incoming HTTP requests. Typically you would log this in the client or using an OS utility if you aren't running your own server-side code in MarkLogic.

Also, there are separate access logs and error logs. The former will show you details about who has accessed a specific app server through which URL and HTTP method, and the latter will display error, warning, etc. messages from XQuery and JS modules on a specific app server.

You can cross reference the timestamp of entries in the access log to the error log, but any 500 error should be easy to find in the error log. At any log level, I think the server always dumps the error and complete call stack, which should point you to the line throwing the exception, along with variables on the stack. That should at least give you some useful information about why the error was thrown.