---
title: MTLLogStateDescriptor
framework: metal
role: symbol
role_heading: Class
path: metal/mtllogstatedescriptor
---

# MTLLogStateDescriptor

An interface that represents a log state configuration.

## Declaration

```swift
class MTLLogStateDescriptor
```

## Mentioned in

Logging shader debug messages

## Overview

Overview Configure the descriptor to create an MTLLogState by calling makeLogState(descriptor:). If you’ve set the environment variables MTL_LOG_BUFFER_SIZE or MTL_LOG_LEVEL, then the system automatically enables logging. If any command buffer or command queue has an attached log state, then the system uses the log state’s settings instead of the environment variable values.

## Topics

### Instance properties

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

### Log levels

- [MTLLogLevel](metal/mtlloglevel.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Shader logging

- [MTLLogState](metal/mtllogstate.md)
