keithbrink / amazon-mws-laravel

A Laravel library for Amazon's MWS web services, supporting Laravel 5-8+
Apache License 2.0
27 stars 23 forks source link

"muteLog" option is not working #16

Closed alexbiship closed 4 years ago

alexbiship commented 4 years ago

Hi,

Thank you for providing us such great library. I'd flag an issue. even if I set "muteLog" is true, it's still logging in laravel 5.5

keithbrink commented 4 years ago

Thanks I'll take a look. When you have a sec, could you show me how you're passing the muteLog option?

alexbiship commented 4 years ago
$config = [
      "merchantId" => $client->sellerid,
      "marketplaceId" => $client->marketplaceId,
      "keyId" => MWS_ACCESS_KEY,
      "secretKey" => MWS_SECRET_KEY,
      "amazonServiceUrl" => $serviceURL,
      "mwsAuthToken" => $client->mwstoken,
      "muteLog" => true
 ];

I'm using dynamic config and setConfig method

keithbrink commented 4 years ago

Thanks, that's helpful.

alexbiship commented 4 years ago

Just FYI, when I disable call_user_func(['Log', $loglevel], $msg) in AmazonCore.php file(line #529), it looks like muteLog functionality is working properly.

keithbrink commented 4 years ago

Fixed in 7.0.1, thanks for reporting! The issue was the call_user_func coming before the muteLog check.

Added two tests to ensure this doesn't come up again.