# LogException

> A variant of Logger.Log that logs an exception message.

## Definition

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

## LogException(Exception)

A variant of [Logger.Log](/engine/6000.7/script-reference/unityengine/logger/log.md) that logs an exception message.

```csharp
public void LogException(Exception exception)
```

### Parameters

**** (\[Exception]\(https\://learn.microsoft.com/dotnet/api/system.exception)): Runtime Exception.

## LogException(Exception, Object)

A variant of [Logger.Log](/engine/6000.7/script-reference/unityengine/logger/log.md) that logs an exception message.

```csharp
public void LogException(Exception exception, Object context)
```

### Parameters

**** (\[Exception]\(https\://learn.microsoft.com/dotnet/api/system.exception)): Runtime Exception.**** (\[Object]\(/engine/6000.7/script-reference/unityengine/object)): Object to which the message applies.
