Skip to content

Logging Overview

Mr.P edited this page Aug 25, 2026 · 1 revision

Logging Overview

AIBudsLogSDK provides the process-wide logging entry point used by AIBuds SDK modules and applications. Its active LogService records messages, exports retained logs, and purges expired entries.

Available Features

Browse the generated Wiki navigation for the pages in this section.

Logging Model

LogConfiguration controls:

Setting Default Purpose
level .info Minimum severity recorded by the default logger.
destination .xlfacility Active output destination.
logsDirectory .aibuds/logs File destination directory relative to Documents.
maxFileSize 10,000,000 bytes Maximum size of a single file log.
logFileMaxAge 3 days Retention age used for log cleanup.

LogDestination supports .console, .oslogger, .file, and .xlfacility. Only one destination is active at a time.

Integration Flow

  1. Configure the level, destination, storage, and retention settings early in application startup.
  2. If using .xlfacility, install the AIBudsXLFacility plugin before logs are written.
  3. Record messages through AIBudsLogSDK.logService or allow AIBuds modules to use the same service.
  4. Export or purge logs through the active LogService.

Important Behavior

  • Console and OS Logger destinations do not support export.
  • File and XLFacility destinations support export and retention cleanup.
  • If no custom service is installed, AIBudsLogSDK.logService returns the built-in DefaultLogger.
  • Selecting .xlfacility without configuring its plugin falls back to an error message in the console and cannot persist or export through XLFacility.

AIBuds SDK iOS Wiki

Clone this wiki locally