---
title: bufferSize
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtllogstatedescriptor/buffersize
---

# bufferSize

The size of the internal buffer the log state uses, specified in bytes.

## Declaration

```swift
var bufferSize: Int { get set }
```

## Discussion

Discussion The default value is 1MB. The minimum size of log buffer is 1KB and the maximum size is 1GB. Carefully consider the size of this buffer based on how many messages you expect your shader to log and be useful to diagnose problems. A smaller size might lead to the shader dropping more messages while a larger size might result in a larger memory footprint and reduced performance due to excessive logging.

## See Also

### Instance properties

- [level](metal/mtllogstatedescriptor/level.md)
