লগিং
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
Google Ads API-এ করা অনুরোধ, প্রতিক্রিয়া এবং সারাংশ বার্তাগুলি আপনার নিজস্ব কাস্টম লগার বা রুবি লাইব্রেরিতে একটি ডিফল্ট লগারে লগ করা যেতে পারে।
লগ লেভেল
লাইব্রেরি বিভিন্ন লগ লেভেলে বিভিন্ন ধরনের ইভেন্ট লগ করবে। একটি সফল API প্রতিক্রিয়াতে, সারাংশটি INFO
এ লগ করা হবে, এবং সম্পূর্ণ অনুরোধ এবং প্রতিক্রিয়াগুলি DEBUG
এ লগ করা হবে৷ একটি API ত্রুটির ফলে একটি অনুরোধে, সংক্ষিপ্ত বার্তাটি WARN
এ লগ করা হবে এবং সম্পূর্ণ অনুরোধ এবং প্রতিক্রিয়া INFO
এ লগ করা হবে৷
আংশিক ব্যর্থতার জন্য, আংশিক ব্যর্থতার বিবরণ DEBUG
এ লগ করা হবে।
কনফিগারেশন
লগারটিকে আপনার google_ads_config.rb কনফিগারেশনের অংশ হিসাবে কনফিগার করা যেতে পারে। আপনি log_level
এবং log_target
ক্ষেত্রগুলি নির্দিষ্ট করে একটি ডিফল্ট লগার সেট আপ করতে পারেন, অথবা আপনি logger
নির্দিষ্ট করে সম্পূর্ণরূপে আপনার নিজস্ব লগার নির্দিষ্ট করতে পারেন। আপনি যদি logger
নির্দিষ্ট করেন, তাহলে log_level
এবং log_target
উপেক্ষা করা হবে।
আপনি client.logger=
ব্যবহার করে ক্লায়েন্টকে ইনস্ট্যান্টিয়েট করার পরে একটি লগারও নির্দিষ্ট করতে পারেন।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-21 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-21 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Google Ads API Ruby library allows logging of requests, responses, and summaries to custom or default loggers.\u003c/p\u003e\n"],["\u003cp\u003eDifferent log levels are used for successful responses (\u003ccode\u003eINFO\u003c/code\u003e, \u003ccode\u003eDEBUG\u003c/code\u003e) and errors (\u003ccode\u003eWARN\u003c/code\u003e, \u003ccode\u003eINFO\u003c/code\u003e, \u003ccode\u003eDEBUG\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eLogging can be configured through the \u003ccode\u003egoogle_ads_config.rb\u003c/code\u003e file using \u003ccode\u003elog_level\u003c/code\u003e, \u003ccode\u003elog_target\u003c/code\u003e, or a custom \u003ccode\u003elogger\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAfter client instantiation, the logger can be specified using \u003ccode\u003eclient.logger=\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Logging\n\nRequests, responses, and summary messages made to the Google Ads API can be\nlogged to your own custom logger or a default logger in the Ruby library.\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\nFor partial failures, the partial failure details will be logged at `DEBUG`.\n\nConfiguration\n-------------\n\nThe logger can be configured as part of your\n[google_ads_config.rb](https://github.com/googleads/google-ads-ruby/blob/HEAD/google_ads_config.rb)\nconfiguration. You can set up a default logger by specifying the `log_level` and\n`log_target` fields, or you can specify your own logger entirely by specifying\n`logger`. If you specify `logger`, then `log_level` and `log_target` will be\nignored.\n\nYou can also specify a logger after instantiating the client using\n`client.logger=`."]]