লগিং
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
Google Ads API তে করা অনুরোধ, প্রতিক্রিয়া এবং সারাংশ বার্তাগুলি আপনার নিজস্ব কাস্টম লগার বা পার্লের ক্লায়েন্ট লাইব্রেরিতে ডিফল্ট লগার দিয়ে লগ করা যেতে পারে।
লগ লেভেল
লাইব্রেরি বিভিন্ন লগ লেভেলে বিভিন্ন ধরনের ইভেন্ট লগ করবে। একটি সফল API প্রতিক্রিয়াতে, সারাংশটি INFO
এ লগ করা হবে, এবং সম্পূর্ণ অনুরোধ এবং প্রতিক্রিয়াগুলি DEBUG
এ লগ করা হবে৷ একটি API ত্রুটির ফলে একটি অনুরোধে, সংক্ষিপ্ত বার্তাটি WARN
এ লগ করা হবে এবং সম্পূর্ণ অনুরোধ এবং প্রতিক্রিয়া INFO
এ লগ করা হবে৷
লগ টাইপ | লগ নাম | সাফল্যের স্তর | ব্যর্থতার স্তর |
---|
সারাংশ | Google.Ads.GoogleAds.Summary | তথ্য | সতর্ক করুন |
বিস্তারিত | Google.Ads.GoogleAds.Detail | ডিবাগ | তথ্য |
আংশিক ব্যর্থতার জন্য, আংশিক ব্যর্থতার বিবরণ DEBUG
এ লগ করা হবে।
কনফিগারেশন
ক্লায়েন্ট লাইব্রেরি সমস্ত লগিং উদ্দেশ্যে একটি কাস্টম ক্লাস ব্যবহার করে এবং GoogleAdsLogger মডিউলের মাধ্যমে প্রকাশ করা হয়। এই ক্লাসটি একটি ডিফল্ট কনফিগারেশন প্রদান করে যা সারাংশ এবং বিস্তারিত লগার উভয়ই আপনার HOME
ডিরেক্টরির অধীনে logs
ফোল্ডারে আপেক্ষিক ফাইলগুলিতে লগ করবে। কিন্তু আপনার HOME
ডিরেক্টরিতে একটি log4perl.conf ফাইল প্রদান করে ডিফল্ট কনফিগারেশন ওভাররাইড করা যেতে পারে।
নিম্নলিখিত পদ্ধতিগুলি ব্যবহার করে লগিং সক্ষম/অক্ষম করা যেতে পারে:
উভয় লগারের জন্য লগিং সক্ষম করে।
Google::Ads::GoogleAds::Logging::GoogleAdsLogger::enable_all_logging();
সারাংশ লগিং নিষ্ক্রিয় করে।
Google::Ads::GoogleAds::Logging::GoogleAdsLogger::disable_summary_logging();
বিস্তারিত লগিং নিষ্ক্রিয় করে।
Google::Ads::GoogleAds::Logging::GoogleAdsLogger::disable_detail_logging();
অনুরোধগুলি কীভাবে লগ করা হয় তার উপর আরও বেশি নিয়ন্ত্রণের জন্য আপনি সরাসরি GoogleAdsLogger
ক্লাসের পদ্ধতিগুলি ব্যবহার করতে পারেন৷
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-26 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-26 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Google Ads API client library for Perl allows logging of requests, responses, and summaries using a custom or default logger.\u003c/p\u003e\n"],["\u003cp\u003eLogging levels include \u003ccode\u003eINFO\u003c/code\u003e, \u003ccode\u003eDEBUG\u003c/code\u003e, and \u003ccode\u003eWARN\u003c/code\u003e, used to categorize different event types like successes, failures, and partial failures.\u003c/p\u003e\n"],["\u003cp\u003eThe default logger configuration saves logs to the \u003ccode\u003elogs\u003c/code\u003e folder in your home directory, which can be customized by providing a \u003ccode\u003elog4perl.conf\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eLogging can be controlled through the \u003ccode\u003eGoogleAdsLogger\u003c/code\u003e module, allowing for enabling/disabling logging or more advanced customization.\u003c/p\u003e\n"]]],[],null,["# Logging\n\nRequests, responses, and summary messages made to the Google Ads API can be\nlogged with your own custom logger or the default logger in the client library\nfor Perl.\n\nLog Levels\n----------\n\nThe library will log different types of events to different log levels. On a\nsuccessful API response, the summary will be logged at `INFO`, and the full\nrequest and responses will be logged at `DEBUG`. On a request that resulted in\nan API error, the summary message will be logged at `WARN` and the full request\nand response will be logged at `INFO`.\n\n| Log type | Log name | Success level | Failure level |\n|----------|------------------------------|---------------|---------------|\n| SUMMARY | Google.Ads.GoogleAds.Summary | INFO | WARN |\n| DETAIL | Google.Ads.GoogleAds.Detail | DEBUG | INFO |\n\nFor partial failures, the partial failure details will be logged at `DEBUG`.\n\nConfiguration\n-------------\n\nThe client library uses a custom class for all logging purposes and is exposed\nthrough the [GoogleAdsLogger](https://github.com/googleads/google-ads-perl/blob/HEAD/lib/Google/Ads/GoogleAds/Logging/GoogleAdsLogger.pm)\nmodule. This class provides a default configuration that both summary and detail\nloggers will log to relative files in the `logs` folder under your `HOME` directory.\nBut the default configuration can be overridden by providing a\n[log4perl.conf](https://github.com/googleads/google-ads-perl/blob/HEAD/log4perl.conf)\nfile in your `HOME` directory.\n\nLogging can be enabled/disabled using the following methods:\n\n- Enables logging for both loggers.\n\n Google::Ads::GoogleAds::Logging::GoogleAdsLogger::enable_all_logging();\n\n- Disables the summary logging.\n\n Google::Ads::GoogleAds::Logging::GoogleAdsLogger::disable_summary_logging();\n\n- Disables the detail logging.\n\n Google::Ads::GoogleAds::Logging::GoogleAdsLogger::disable_detail_logging();\n\nYou can use the methods of the `GoogleAdsLogger` class directly for even more\ncontrol over how requests are logged."]]