how to disable traces using PHP Client Library V0_7

22 views
Skip to first unread message

Didier Roy

unread,
Mar 19, 2019, 5:58:36 AM3/19/19
to AdWords API and Google Ads API Forum
Hello

I am using PHP Client Library V0_7

how to disable traces that are automatically generated like following when I run examples/BasicOperations/GetCampaigns.php :


[2019-03-19 10:55:18] google-ads.INFO: Request made: Host: "googleads.googleapis.com", Method: "/google.ads.googleads.v0.services.GoogleAdsService/Search", ClientCustomerId: 1931765330, RequestId: "ehyNlu67BCZJwK3GGy2cFA", IsFault: 0, FaultMessage: "None"
[2019-03-19 10:55:18] google-ads.DEBUG: Request
-------
Method Name: /google.ads.googleads.v0.services.GoogleAdsService/Search
Headers: {
    "x-goog-api-client": "gl-php\/5.6.11-1ubuntu3.4 gapic\/ gax\/0.38.0 grpc\/1.17.0",
    "developer-token": "REDACTED",
    "login-customer-id": "4123241990"
}
Request: {"customerId":"1931765330","query":"SELECT campaign.id,\n\t\t\t\tcampaign.name ,\n\t\t\t\t campaign.hotel_setting.hotel_center_id\n\t\t\tFROM campaign \n\t\t\tWHERE campaign.advertising_channel_type = 'HOTEL'","pageSize":1000}

Response
-------
Headers: {
    "content-disposition": "attachment",
    "request-id": "ehyNlu67BCZJwK3GGy2cFA",
    "date": "Tue, 19 Mar 2019 09:55:18 GMT",
    "alt-svc": "quic=\":443\"; ma=2592000; v=\"46,44,43,39\""
}
Response: {"results":[{"campaign":{"resourceName":"customers\/1931765330\/campaigns\/1462826522","id":"1462826522","name":"GHA FR CPC - Mademoiselle","hotelSetting":{"hotelCenterId":"906758838"}}},{"campaign":{"resourceName":"customers\/1931765330\/campaigns\/1465142822","id":"1465142822","name":"GHA US CPC - Mademoiselle","hotelSetting":{"hotelCenterId":"906758838"}}},{"campaign":{"resourceName":"customers\/1931765330\/campaigns\/1674995187","id":"1674995187","name":"GHA DE CPC","hotelSetting":{"hotelCenterId":"906758838"}}},{"campaign":{"resourceName":"customers\/1931765330\/campaigns\/1715412888","id":"1715412888","name":"GHA ROW CPC","hotelSetting":{"hotelCenterId":"906758838"}}},{"campaign":{"resourceName":"customers\/1931765330\/campaigns\/1726519112","id":"1726519112","name":"TEST DIDIER","hotelSetting":{"hotelCenterId":"906758838"}}},{"campaign":{"resourceName":"customers\/1931765330\/campaigns\/1726790308","id":"1726790308","name":"TEST DIDIER","hotelSetting":{"hotelCenterId":"906758838"}}},{"campaign":{"resourceName":"customers\/1931765330\/campaigns\/1734542531","id":"1734542531","name":"TEST DIDIER 2","hotelSetting":{"hotelCenterId":"906758838"}}}],"totalResultsCount":"7","fieldMask":"campaign.id,campaign.name,campaign.hotelSetting.hotelCenterId"}

Didier Roy

unread,
Mar 22, 2019, 8:18:50 AM3/22/19
to AdWords API and Google Ads API Forum
hello 

anybody knowing how to disable these outputs that are generating huge logs when using php client library?

thanks

googleadsapi...@google.com

unread,
Mar 22, 2019, 11:24:15 AM3/22/19
to AdWords API and Google Ads API Forum
Hi Didier,

You could set the logLevel to INFO. Please check the section on logging in the client library for more details.

Thanks,
Sreelakshmi, Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Reply all
Reply to author
Forward
0 new messages