Enabling Logging for Matrix Rate and Product Rate

Overview

Requests/responses are logged into the debug log that can be used to diagnose why rates weren’t generated when using WSA MatrixRate or  ProductRate in Magento.

How to enable it

There are two ways that the debug log can be enabled in M2 and before you move forward you’ll need to check what mode is your site on and you can do so by navigating to your Magento app directory and (the one with index.php) in the shell, then enter:

php bin/magento deploy:mode:show

If it says “production“, only the command line method will work. Otherwise, the GUI method will work too.

Via the admin panel:

Navigate to “Stores” -> “Configuration” -> “Advanced” -> “Developer” -> “Debug” -> “Log to File”. Setting this to “Yes” will write debug information to be logged to var/log/debug.log in your Magento application directory.

Navigate to "Stores" -> "Configuration" -> "Advanced" -> "Developer" -> "Debug" -> "Log to File".

After saving the setting, you may get a prompt at the top of the page asking you to flush the cache. If this appears, flush the Magento cache with the link it gives you.

If production mode is enabled (as displayed by php bin/magento deploy:mode:show) then the GUI option will not be available. Note that this the admin panel normally hides this in production mode, so only use this if you’re testing.

Via the command line from your Magento directory:

First, open the Magento application directory (the one with index.php) in the shell. To enable debug logging enter:php bin/magento config:set dev/debug/debug_logging 1 && php bin/magento cache:flush

This will cause debug information to be logged to var/log/debug.log in your Magento application directory. To disable debug logging, enter:php bin/magento config:set dev/debug/debug_logging 0 && php bin/magento cache:flush

Matrix Rate

If you run into issues with the Matrix Rate extension then navigate to this doc as it contains steps on how to install/resolve issues on the extension.

Was this doc helpful?