Depending on the environment, we want to be able to change the logFilePath and logLevel.
Both are part of google_ads_php.ini so it would be logical if this can also be set via the environment variable.
I have now found a solution:
// Binds the Google Ads API client.
$this->app->singleton('Google\Ads\GoogleAds\Lib\V9\GoogleAdsClient',
function () {
// Constructs a Google Ads API client configured from the properties file.
return (
new GoogleAdsClientBuilder())
->withLogger((
new LoggerFactory())
->createLogger('google-ads', config('googleads.log_file_path'), config('googleads.log_level')))
->withOAuth2Credential((
new OAuth2TokenBuilder())
->fromEnvironmentVariables()
->build())
->fromEnvironmentVariables()
->build();
});