---
title: logState
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlcommandbufferdescriptor/logstate
---

# logState

The shader logging configuration that the command buffer uses.

## Declaration

```swift
var logState: (any MTLLogState)? { get set }
```

## See Also

### Configuring the command buffer

- [retainedReferences](metal/mtlcommandbufferdescriptor/retainedreferences.md)
- [errorOptions](metal/mtlcommandbufferdescriptor/erroroptions.md)
- [MTLCommandBufferErrorOption](metal/mtlcommandbuffererroroption.md)
