Google::Ads::GoogleAds::Logging::GoogleAdsLogger
use Google::Ads::GoogleAds::Logging::GoogleAdsLogger; Google::Ads::GoogleAds::Logging::GoogleAdsLogger::enable_all_logging(1); Google::Ads::GoogleAds::Logging::GoogleAdsLogger::log_summary($http_request, $http_response); Google::Ads::GoogleAds::Logging::GoogleAdsLogger::log_detail($http_request, $http_response);
This class allows logging of outgoing and incoming REST messages as executed API calls. It initializes the loggers based on a provided log4perl.conf file or default parameters if the file is not found. It contains methods to retrieve the summary and detail loggers.
Initializes the loggers based on the default log4perl.conf file or default parameters if the file is not found.
Enables the logging for the one-line summary.
A boolean value of whether to include the DEBUG level messages.
Disables the one-line summary logging.
Enables the logging for traffic detail of HTTP request and response.
Disables the traffic detail logging.
Enables all logging for the one-line summary and the traffic detail.
Stops all logging.
Retrieves the summary logger used to log the one-line summary.
A Log::Log4perl logger for the one-line summary.
Retrieves the detail logger used to log the traffic detail.
A Log::Log4perl logger for the traffic detail.
Logs a one-line summary for each REST API request.
http_request: The REST HTTP request sent to Google Ads API server.
http_response: The HTTP response received from Google Ads API server.
Full log of the traffic detail about the request/response payload.
The private method to parse the hostname from a HTTP request.
The parsed hostname in the format of <scheme>://<domain>.
The private method to parse the fault message from the HTTP response, if an error has occurred at the server side. This message can be used to construct a Google::Ads::GoogleAds::Logging::SummaryStats.
The private method to parse all the faults from the HTTP response, and encode them in the JSON format. These faults will be used to construct a Google::Ads::GoogleAds::Logging::DetailStats.
encode
Copyright 2019 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
$Rev: $ $LastChangedBy: $ $Id: $
To install Google::Ads::GoogleAds::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Google::Ads::GoogleAds::Client
CPAN shell
perl -MCPAN -e shell install Google::Ads::GoogleAds::Client
For more information on module installation, please visit the detailed CPAN module installation guide.