---
title: "fetchErrorLog(completionHandler:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avplayeritem/fetcherrorlog(completionhandler:)"
---

# fetchErrorLog(completionHandler:)

Asynchronously retrieves the error log without blocking the calling thread.

## Declaration

```swift
nonisolated func fetchErrorLog(completionHandler: @escaping @Sendable (sending AVPlayerItemErrorLog?) -> Void)
```

```swift
nonisolated var errorLog: AVPlayerItemErrorLog? { get async }
```

## Parameters

- `completionHandler`: A block that is called with the error log. May be called with nil if no logging information is available.

## Discussion

Discussion An AVPlayerItemErrorLog provides methods to retrieve the error log in a format suitable for serialization. If nil is returned then there is no logging information currently available for this AVPlayerItem.
