While attempting to figure out why a site was returning high shipping estimates (turns out it is the lack of negotiated rate support: https://www.drupal.org/project/commerce_ups/issues/2971795) I turned on API logging so I could check the messages. But nothing got logged. Reviewing code I couldn't find any actual instances of a logger being called except for error logging or in tests.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

drakythe created an issue. See original summary.

drakythe’s picture

Using commerce_fedex module behavior as a model I replicated the functionality and added logging of request and response objects.

drakythe’s picture

Status: Active » Needs review
drakythe’s picture

Patch with correct variable log.

  • jsacksick committed 0ac10a6c on 8.x-3.x authored by drakythe
    Issue #3276058 by drakythe, jsacksick: Implement rate request logging.
    
jsacksick’s picture

Status: Needs review » Fixed

Re-rolled and committed a slightly different patch, thanks for your contribution.

The log level constant didn't seem to exist in D9, so went with calling info() instead (which was the default so same behavior).

  • jsacksick committed 22d8e72f on 8.x-3.x
    Issue #3276058 followup by jsacksick: Ensure the response is logged when...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.