# IsValidationErrorLoggingSuppressed()

> Returns whether immediate logging of graphics API validation errors is currently suppressed.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.6/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static bool IsValidationErrorLoggingSuppressed()
```

### Returns

| Type                                                          | Description                                               |
| ------------------------------------------------------------- | --------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | true if immediate logging is suppressed; otherwise false. |

### Remarks

Use this to check the current logging state before changing it, for example so you can restore it after a temporary scope. Logging isn't suppressed by default; the value only changes when something calls [GraphicsApiValidation.SetValidationErrorLoggingSuppressed](/engine/6000.6/script-reference/unityengine/rendering/graphicsapivalidation/setvalidationerrorloggingsuppressed.md).

Additional Resources: [GraphicsApiValidation.SetValidationErrorLoggingSuppressed](/engine/6000.6/script-reference/unityengine/rendering/graphicsapivalidation/setvalidationerrorloggingsuppressed.md).

### Examples

```csharp
using UnityEngine;
using UnityEngine.Rendering;

public class Example : MonoBehaviour
{
    // When logging is suppressed, accumulated errors haven't been written
    // to the log yet, so the caller is responsible for emitting them.
    void ReportAccumulatedErrors()
    {
        if (GraphicsApiValidation.IsValidationErrorLoggingSuppressed())
        {
            int count = GraphicsApiValidation.GetValidationErrorCount();
            for (int i = 0; i < count; i++)
            {
                Debug.LogError(GraphicsApiValidation.GetValidationError(i));
            }
        }
    }
}
```
