> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spikeapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# iOS SDK Logging

> Getting logs for troubleshooting and debugging from Spike SDK for iOS platform.

## Code Examples

To receive logs from Spike SDK, use the following code:

```swift theme={null}
Spike.setLogCallback { level, message in
    print("\(message)")
}
```

If you are using background delivery, ensure this code runs in your application's `didFinishLaunchingWithOptions` method before you start using Spike SDK:

```swift theme={null}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    ...
    Spike.setLogCallback { level, message in
        print("\(message)")
    }
    Spike.configure()
    ...
}
```
