Using the Logger in Zoey

Logger Overview

The ShipperHQ extension comes with the comprehensive WebShopApps Logger. This enables you to inspect the workings of the extension, and if necessary, provide logs when raising support calls. We have created a screen cast which walks through how to use the WebShopApps Logger. This is based in Magento, but the principle is the same.

.

Manual Configuration of the Logger

Key Features

The logger gives you the following capabilities:

  1. Dedicated log panel within admin, no need to open log files
  2. Ability to set logging level to show more/less logs

Additionally we have added the following functionality:

  1. Runs asynchronously, reducing impact on performance to a minimum
  2. Ability to switch off when in production, will not affect performance at all

Configuration

The Logger is configured under Setup->Shipping->ShipperHQ->Configure. You need to scroll to the bottom and you’ll find a section called Developer Use Only. In that section is a link to edit the logger settings.

When your site is switched to production/live, please clear out all logs and disable WebShopApps Logging otherwise your database/file system will fill up and it will slow down your store.

Screen Shot 2016-11-15 at 14.52.14

Screen Shot 2016-11-15 at 14.55.38

Ensure you choose Shipperhq_Shipper as the extension to log output from!

Once you have set up the logger configuration, you will need to get a shipping quote in cart or checkout with the items in the cart that highlight the issue.

Where Do I Find the Logs?

Logs will by shown under Setup->Shipping->ShipperHQ->Configure. Go to Developer Use Only again but this time click on View the current log report.

Screen Shot 2016-11-15 at 14.59.32

An example output will be a grid of logs. Depending on the log level set you will see more/less logs. You will most likely want to look at the log called “Rate request and result”.

What level of logging do I need?

There are 4 levels of logging you can choose, choosing one will include all levels above it, i.e. if you choose debug then info, warning, critical will also be captured.

Level Description Recommended for
Critical Displays critical issues such as unable to process data  Useful in testing, set to log to email and receive notifications of any issues found. Don’t see this as a replacement for actual manual testing though!
Warning Displays warning messages, e.g. a rate cannot be found for this zipcode Useful to highlight any issues in testing
Info Gives high level informational messages in a format that can be understood When you want useful information on the working of the extension
Debug In depth technical information on an extension Expert users only, much of information will not make sense, this is primarily used by WebShopApps to see debugging. You may be asked to create debug logs to send to WebShopApps so we can see your configuration setup
When running in production we recommend that all logging is switched off for performance reasons.

How to find a Transaction ID in the logs

The Transaction ID is used by our support team to get into the issues faster. By providing this, along with your support email we can start looking into the problem much faster. If you have already enabled the logs as described above, you can skip to step 6 below.

1. Go to Setup > Shipping > ShipperHQ > Configure > Developer Use Only > Edit log settings
2. Under Logger Configuration, set Enabled to Yes
3. Set Minimum Log Level – Admin Panel to ‘Debug’

4. Under Extension(s) to log output from, ensure Shipperhq_Shipper is set to Enabled
5. Save the configuration changes

6. Perform the request or test that you are investigating
7. Go to Setup > Shipping > ShipperHQ > Configure > Developer Use Only > View the current log report
8. Open the entry titled “Rate Request and Result”

9. Scroll down until you see the field TransactionId, within the response. Use cmd-f (if mac), or ctrl-f on others. Then type “transaction” and the transaction id is found.

10. Copy this number, along with a description of the problem you’re having to the support team so they can begin to diagnose the issue.
11. Once you have this information, remember to disable the WebShopApps logger as per steps 2 and 3

Please remember to turn the logger off, it does not need to be constantly running. If left running it will slow down your shipping rates exponentially.