<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPlayerItem/fetchErrorLog(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayerItem(im)fetchErrorLogWithCompletionHandler:"
  },
  "title" : "fetchErrorLog(completionHandler:)"
}
-->

# fetchErrorLog(completionHandler:)

Asynchronously retrieves the error log without blocking the calling thread.

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

```
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

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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)