> [!NOTE]
> **Note:** Logging is not supported for REST calls yet.

The PHP client library conforms to [PSR-3](https://www.php-fig.org/psr/psr-3/) for logging and provides a
logger for gRPC calls.

The [PSR-3 log level](https://www.php-fig.org/psr/psr-3/#5-psrlogloglevel) at which messages are logged depends on
whether the event succeeded:

| Log message | Success status | Failure status |
|---|---|---|
| One-line summary | INFO | WARNING |
| Debug message (e.g., call queries) | DEBUG | NOTICE |

## Configure logging

By default, each of the library loggers writes to [`STDERR`](https://www.php.net/manual/en/features.commandline.io-streams.php) on a
channel with the default name specified in
[`GoogleAdsClientBuilder`](https://github.com/googleads/google-ads-php/blob/HEAD/src/Google/Ads/GoogleAds/Lib/V26/GoogleAdsClientBuilder.php#L34) using a [Monolog
`StreamHandler`](https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/StreamHandler.php).

You can configure options for the default logger in your
[`google_ads_php.ini`](https://github.com/googleads/google-ads-php/blob/HEAD/examples/Authentication/google_ads_php.ini) file:

    [LOGGING]
    ; Optional logging settings.
    logFilePath = "path/to/your/file.log"
    logLevel = "INFO"

Ensure that the runtime PHP process has write permissions for the directory and
file specified in `logFilePath`.

If you need to further customize logging, you can specify your own custom logger
by providing a logger instance that implements the
[`LoggerInterface`](https://www.php-fig.org/psr/psr-3/) in [`GoogleAdsClientBuilder`](https://github.com/googleads/google-ads-php/blob/HEAD/src/Google/Ads/GoogleAds/Lib/V26/GoogleAdsClientBuilder.php):

    $googleAdsClient = (new GoogleAdsClientBuilder())
        // ...
        ->withLogger(new MyCustomLogger())
        ->build();