cancel
Showing results for 
Search instead for 
Did you mean: 

Where to find relevant log file for REST API?

Where to find relevant log file for REST API?

Hi Community Members,

 

I'm using a swagger generated api and trying to create a shipment for an order. I'm using this endpoint from the api reference click me . I get the error {"message":"Could not save a shipment, see error log for details"} and can't find the log file for debug information. Any help would be much appreciated.

 

side questions:

Why do some api responses possess "web-api <reference_id>"  and others do not?

 

3 REPLIES 3

Re: Where to find relevant log file for REST API?

Hi @hauscloudmf3d0 ,

 

You can check the log file in below folders 

var/log/*

var/report/*

Var/report/api/* with that api reference I'd

 

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!

 

Re: Where to find relevant log file for REST API?

Hello @hauscloudmf3d0 ,

Execute the following command from your Magento root directory(suppose your reference id is 123456789 i.e webapi-123456789)

grep -r "webapi-123456789" var/

 This will show the name of the log file. Hopefully, it is in exception.log, open the log file, and search for webapi-123456789 you will get detailed about your error in detail.

 

If this helps you, please accept this as a solution and give kudos.

Re: Where to find relevant log file for REST API?

@Nishu Jindal How does developer mode and logging mode fit in? Does developer mode and/or logging have to be turned on? I was just wondering after reading the articles below.

 

Dev Mode 

Logging