# LogError(string, Object)

> Logs an import error message to the console.

## Definition

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

> **Warning:**
>
> **Deprecated.** Use context.LogImportError(string, Object) instead.

```csharp
public void LogError(string warning, Object context)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[Object]\(/engine/6000.7/script-reference/unityengine/object)):&#x20;

### Remarks

Pass an asset as the second argument to link the error to the asset in the editor.

Additional Resources: [Debug.LogError](/engine/6000.7/script-reference/unityengine/debug/logerror.md).
