---
title: enableLogging
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlcompileoptions/enablelogging
---

# enableLogging

A Boolean value that enables shader logging.

## Declaration

```swift
var enableLogging: Bool { get set }
```

## Mentioned in

Logging shader debug messages

## Discussion

Discussion Because logging incurs overhead, regardless of whether the system prints messages, you need to explicitly enable logging.

## See Also

### Configuring the compiler options

- [mathMode](metal/mtlcompileoptions/mathmode.md)
- [mathFloatingPointFunctions](metal/mtlcompileoptions/mathfloatingpointfunctions.md)
- [preserveInvariance](metal/mtlcompileoptions/preserveinvariance.md)
- [languageVersion](metal/mtlcompileoptions/languageversion.md)
- [preprocessorMacros](metal/mtlcompileoptions/preprocessormacros.md)
- [optimizationLevel](metal/mtlcompileoptions/optimizationlevel.md)
- [libraries](metal/mtlcompileoptions/libraries.md)
- [fastMathEnabled](metal/mtlcompileoptions/fastmathenabled.md)
