<!--
{
  "availability" : [
    "*: -"
  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTestLog",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:objc(cs)XCTestLog"
  },
  "title" : "XCTestLog"
}
-->

# XCTestLog

An object that logs test failures and errors.

```
class XCTestLog
```

## Topics

### Logging Test Results

[`logFileHandle`](/documentation/XCTest/XCTestLog/logFileHandle)

An object to interact with the test log file.

[`testLog(withFormat:arguments:)`](/documentation/XCTest/XCTestLog/testLog(withFormat:arguments:))

Logs test results to the test log.

[`testLogWithFormat:`](/documentation/XCTest/XCTestLog/testLogWithFormat:)

Logs test results to the test log.



---

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)