---
title: function
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlfunctionlog/function
---

# function

When known, the function object corresponding to the logged message.

## Declaration

```swift
var function: (any MTLFunction)? { get }
```

## See Also

### Getting execution details

- [debugLocation](metal/mtlfunctionlog/debuglocation.md)
- [encoderLabel](metal/mtlfunctionlog/encoderlabel.md)
- [MTLFunctionLogDebugLocation](metal/mtlfunctionlogdebuglocation.md)
