# LogErrorFormat

> Logs a formatted error message to the Unity console.

## Definition

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

## LogErrorFormat(string, Object\[])

Logs a formatted error message to the Unity console.

```csharp
public static void LogErrorFormat(string format, params object[] args)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A composite format string.**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): Format arguments.

### Remarks

For formatting details, see the MSDN documentation on Composite Formatting. Rich text markup can be used to add emphasis. See the manual page about rich text for details of the different markup tags available.

Additional Resources: [Debug.unityLogger](/engine/6000.5/script-reference/unityengine/debug/unitylogger.md), [ILogger](/engine/6000.5/script-reference/unityengine/ilogger.md), [Logger.LogError](/engine/6000.5/script-reference/unityengine/logger/logerror.md).

## LogErrorFormat(Object, string, Object\[])

Logs a formatted error message to the Unity console.

```csharp
public static void LogErrorFormat(Object context, string format, params object[] args)
```

### Parameters

**** (\[Object]\(/engine/6000.5/script-reference/unityengine/object)): Object to which the message applies.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A composite format string.**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): Format arguments.

### Remarks

For formatting details, see the MSDN documentation on Composite Formatting. Rich text markup can be used to add emphasis. See the manual page about rich text for details of the different markup tags available.

Additional Resources: [Debug.unityLogger](/engine/6000.5/script-reference/unityengine/debug/unitylogger.md), [ILogger](/engine/6000.5/script-reference/unityengine/ilogger.md), [Logger.LogError](/engine/6000.5/script-reference/unityengine/logger/logerror.md).
