हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
नतीजे की जानकारी देने वाले टूल से मिली लॉग फ़ाइलों को मैनेज करना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
कुछ मामलों में, सिर्फ़ टेस्ट के नतीजों का ऐक्सेस होना काफ़ी नहीं होता. पूरे नतीजे पाने के लिए, लॉग फ़ाइलों का ऐक्सेस होना ज़रूरी है.
लॉग इंटरफ़ेस
नतीजे की जानकारी देने वाला कोई भी व्यक्ति या टेस्ट इवेंट, ILogSaverListener
को लागू करके लॉग ऐक्सेस कर सकता है. इससे रिपोर्टर को अलग-अलग कॉलबैक के ज़रिए लॉग मिलते हैं:
testLogSaved
: फ़ाइल लॉग होने पर तुरंत कॉल किया जाता है. इससे यह सूचना मिलती है कि कोई नई फ़ाइल लॉग की गई है. इसे कभी भी कहा जा सकता है.
logAssociation
: टेस्ट इवेंट के क्रम में कॉल किया जाता है. इससे, लॉग की जा रही फ़ाइल और चल रहे इवेंट के बीच का संबंध बेहतर तरीके से जुड़ा रहता है.
इस इंटरफ़ेस को लागू करने पर, नतीजे की शिकायत करने वाले व्यक्ति के पास, लॉग की गई फ़ाइल के रेफ़रंस का ऐक्सेस होता है और वह उनका इस्तेमाल कर सकता है.
logAssociation का इस्तेमाल कब करना चाहिए
logAssociation
थोड़ा ज़्यादा जटिल इवेंट है, क्योंकि इसे सही तरीके से समझने के लिए, इवेंट के कॉन्टेक्स्ट पर निर्भर रहना पड़ता है. उदाहरण के लिए, अगर testStart
को कॉल किया गया है, तो logAssociation
का लॉग, चल रहे टेस्ट केस से जुड़ा है.
इस असोसिएशन की मदद से, लॉग को सही जगह पर रखा जा सकता है.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# Handle log files from a result reporter\n\nIn some cases, having access to only the test results isn't enough; having\nthe log files is necessary to complete the overall results.\n\nLog interface\n-------------\n\nAny result reporter or [test event](/docs/core/tests/tradefed/architecture/result-reporter#core_interface)\ncan have access to the logs by implementing\n[`ILogSaverListener`](https://android.googlesource.com/platform/tools/tradefederation/+/refs/heads/android16-release/invocation_interfaces/com/android/tradefed/result/ILogSaverListener.java),\nwhich lets a reporter receive the logs through different callbacks:\n\n- `testLogSaved`: Called right away when a file is logged. This notifies a new file has been logged. This is called at any time.\n- `logAssociation`: Called in order with the test events. This ensures a strong association between the file being logged and the events in progress.\n\nBy implementing this interface, the result reporter can have access to the\nlogged file references and use them.\n\nWhen to use logAssociation\n--------------------------\n\n`logAssociation` is a slightly more complicated event as it relies on the\ncontext of the events to be properly interpreted. For example, if the\n`testStart` has been called, the log from `logAssociation` belongs to the test\ncase in progress.\n\nThis strong association allows for correct placement of logs."]]