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

# testLog(withFormat:arguments:)

Logs test results to the test log.

```
func testLog(withFormat format: String!, arguments: CVaListPointer)
```

## Parameters

`format`

A string that describes a test result by replacing format indicators with variable data, such as failure details, source code filenames, and line numbers.

`arguments`

Variable data to replace in the format string, such as failure details, source code filenames, and line numbers.

## Discussion

---

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)