लॉगिंग का परिचय
AIBudsLogSDK AIBuds SDK modules और apps के लिए process-wide logging entry point देता है। इसका active LogService messages record करता है, retained logs export करता है और expired entries हटाता है।
उपलब्ध सुविधाएँ
आउटपुट के तरीके
Active AIBuds logging level और output destination configure करें
लॉग एक्सपोर्ट करें
सहेजे गए AIBuds logs को एक file या सीमित आकार वाली files में export करें
पुराने लॉग हटाएँ
अधिकतम उम्र या cutoff date के आधार पर सहेजे गए logs हटाएँ
AI की सहायता से लागू करें
AI से बनाएँ
इस वर्कफ़्लो को AI से लागू करें
आधिकारिक “AIBuds लॉग प्रबंधित करें” स्किल से वर्कफ़्लो को अपने ऐप के अनुसार लागू करें।
https://docs-aibuds.github.io/hi/skills/manage-aibuds-logs को पढ़ें और निर्देशों का पालन करें। इस स्किल से “AIBuds लॉग प्रबंधित करें” को इस iOS प्रोजेक्ट में लागू करें और परिणाम सत्यापित करें।लॉगिंग मॉडल
LogConfiguration इन settings को नियंत्रित करता है:
| Setting | Default | उपयोग |
|---|---|---|
level | .info | Default logger द्वारा record की जाने वाली न्यूनतम severity। |
destination | .xlfacility | Active output destination। |
logsDirectory | .aibuds/logs | Documents के सापेक्ष log file directory। |
maxFileSize | 10,000,000 bytes | एक log file का अधिकतम आकार। |
logFileMaxAge | 3 दिन | Log cleanup के लिए retention अवधि। |
LogDestination .console, .oslogger, .file और .xlfacility को support करता है। एक समय में केवल एक destination active रहता है।
इंटीग्रेशन प्रक्रिया
- App startup की शुरुआत में level, destination, storage और retention settings configure करें।
.xlfacilityउपयोग करने पर logs लिखे जाने से पहलेAIBudsXLFacilityplugin install करें।AIBudsLogSDK.logServiceसे messages record करें या AIBuds modules को यही service उपयोग करने दें।- Active
LogServiceसे logs export या purge करें।
महत्वपूर्ण व्यवहार
- Console और OS Logger destinations export support नहीं करते।
- File और XLFacility destinations export तथा retention cleanup support करते हैं।
- Custom service install न होने पर
AIBudsLogSDK.logServicebuilt-inDefaultLoggerलौटाता है। - Plugin configure किए बिना
.xlfacilityचुनने पर console में error message मिलता है और XLFacility के जरिए logs persist या export नहीं हो सकते।