If you need to further customize logging, you can specify your own logger
entirely by providing a logger that implements the
LoggerInterface in
GoogleAdsClientBuilder:
$googleAdsClient = (new GoogleAdsClientBuilder()) ... ->withLogger(new MyCustomLogger()) ->build();
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eThe PHP client library uses PSR-3 for logging gRPC calls, with log levels varying based on success or failure of the event.\u003c/p\u003e\n"],["\u003cp\u003eBy default, logs are written to \u003ccode\u003eSTDERR\u003c/code\u003e using a Monolog StreamHandler with configurable options in the \u003ccode\u003egoogle_ads_php.ini\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eFor advanced customization, developers can implement the \u003ccode\u003eLoggerInterface\u003c/code\u003e and provide their own logger to the \u003ccode\u003eGoogleAdsClientBuilder\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eLogging is currently not supported for REST calls.\u003c/p\u003e\n"]]],[],null,["| **Note:** Logging is not supported for REST calls yet.\n\nThe PHP client library conforms to [PSR-3](http://www.php-fig.org/psr/psr-3) for\nlogging and provides a logger for gRPC calls.\n\nThe [level](//www.php-fig.org/psr/psr-3/#5-psrlogloglevel) at which messages are\nlogged depends on whether the event succeeded.\n\n| Log message | Success status | Failure status |\n|------------------------------------|----------------|----------------|\n| One-line summary | INFO | WARNING |\n| Debug message (e.g., call queries) | DEBUG | NOTICE |\n\nConfiguring logging\n\nBy default, each of the library loggers logs to\n[`STDERR`](http://php.net/manual/en/features.commandline.io-streams.php) on a\nchannel with default name specified\n[here](https://github.com/googleads/google-ads-php/blob/HEAD/src/Google/Ads/GoogleAds/Lib/V20/GoogleAdsClientBuilder.php#L34)\nusing a [Monolog\nStreamHandler](https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/StreamHandler.php).\n\nYou can configure some options for the default logger in the\n[`google_ads_php.ini`](https://github.com/googleads/google-ads-php/blob/HEAD/examples/Authentication/google_ads_php.ini)\nfile:\n\n\\[LOGGING\\] ; Optional logging settings. logFilePath = \"path/to/your/file.log\"\nlogLevel = \"INFO\"\n\nIf you need to further customize logging, you can specify your own logger\nentirely by providing a logger that implements the\n[`LoggerInterface`](//www.php-fig.org/psr/psr-3/) in\n[`GoogleAdsClientBuilder`](https://github.com/googleads/google-ads-php/blob/HEAD/src/Google/Ads/GoogleAds/Lib/V%0A20/GoogleAdsClientBuilder.php): \n\n $googleAdsClient = (new GoogleAdsClientBuilder())\n ...\n -\u003ewithLogger(new MyCustomLogger())\n -\u003ebuild();"]]