Closed nhtahoe closed 7 years ago
Could you please tell what you've run? Just a GetCampaigns example?
I'm using AWQL to fetch Campaigns in an account and with the library installed as a Web App. Also happening when I use AWQL to fetch Ads in an adgroup with AdGroupService:
[2017-09-11 12:00:15] local.WARNING: AdGroupService 201708 [2017-09-11 12:00:16] local.INFO: clientCustomerId=###operations=1 service=AdGroupService method=query responseTime=357 requestId=###server= adwords.google.com isFault=0 faultMessage= [2017-09-11 12:00:16] local.DEBUG: POST /api/adwords/cm/v201708/AdGroupService?wsdl HTTP/1.1 Host: adwords.google.com Connection: close User-Agent: PHP-SOAP/7.1.6-1~ubuntu16.04.1+deb.sury.org+1 Content-Type: text/xml; charset=utf-8 SOAPAction: "" Content-Length: 963 Authorization: REDACTED
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201708">
HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Date: Mon, 11 Sep 2017 19:00:16 GMT Expires: Mon, 11 Sep 2017 19:00:16 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Server: GSE Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,35" Accept-Ranges: none Vary: Accept-Encoding Connection: close
Hmm.. Could you share the code snippet that does this and relevant parts in adsapi_php.ini
too please?
It looks like your code has been modified in a way that it produces the service and version used at WARNING level.
If unmodified, the code should produce logs with AW_SOAP
as a prefix (as specified at this line):
[2017-09-12 12:03:13] AW_SOAP.INFO: clientCustomerId=xxxx operations=1 service=CampaignService method=get .... (snip) ...
But yours are:
[2017-09-11 12:00:16] local.INFO: clientCustomerId=###operations=1 ... (snip) ...
Tuns out this was totally my bad, and you can close the issue. As I was gathering code snippets to share with you, I realized that it is my code that was adding the WARNING log lines. My logs now look like:
[2017-09-12 10:22:13] local.INFO: clientCustomerId=xxxx operations=1 service=CampaignService method=query responseTime=125 requestId=xxxx server= adwords.google.com isFault=0 faultMessage= [2017-09-12 10:22:13] local.INFO: clientCustomerId=xxxx operations=1 service=AdGroupAdService method=query responseTime=198 requestId=xxxx server=adwords.google.com isFault=0 faultMessage=
I think the reason my logs are startng with local.INFO is that I'm not using the adsapi_php.ini file, and instead setting logger as follows on the session:
$session = (new \Google\AdsApi\AdWords\AdWordsSessionBuilder())
->withDeveloperToken(env('ADWORDS_DEVELOPER_TOKEN'))
->withSoapLogger(\Illuminate\Support\Facades\Log::getMonolog())
->withOAuth2Credential($oAuth2);
On Mon, Sep 11, 2017 at 8:07 PM, Thanet Knack Praneenararat < notifications@github.com> wrote:
Hmm.. Could you share the code snippet that does this and relevant parts in adsapi_php.ini too please? It looks like your code has been modified in a way that it produces the service and version used at WARNING level.
If unmodified, the code should produce logs with AW_SOAP as a prefix (as specified at [this line](and relevant parts in adsapi_php.ini )):
[2017-09-12 12:03:13] AW_SOAP.INFO: clientCustomerId=xxxx operations=1 service=CampaignService method=get .... (snip) ...
But yours are:
[2017-09-11 12:00:16] local.INFO: clientCustomerId=###operations=1 ... (snip) ...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/googleads/googleads-php-lib/issues/354#issuecomment-328720857, or mute the thread https://github.com/notifications/unsubscribe-auth/AKdsMKuf5UhXaUIge4vIXqjbe8M1zl-Oks5shfV7gaJpZM4PTkkz .
Thanks for getting back to me.
According to the documentation on logging in the Google Ads API Client Library for PHP, a WARNING in the logs means "failure".
However, I'm able to successfully run my queries, gets, and mutates even though my logs look like below. Any ideas what the "WARNING" is about?"