# GetImportLog(string)

> Retrieves logs generated during the import of the asset at path.

## Definition

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

```csharp
public static ImportLog GetImportLog(string path)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;

### Returns

| Type                                                                                 | Description |
| ------------------------------------------------------------------------------------ | ----------- |
| [ImportLog](/engine/6000.7/script-reference/unityeditor/assetimporters/importlog.md) |             |

### Remarks

Additional Resources: [ImportLog](/engine/6000.7/script-reference/unityeditor/assetimporters/importlog.md), [AssetImportContext.LogImportError](/engine/6000.7/script-reference/unityeditor/assetimporters/assetimportcontext/logimporterror.md), [AssetImportContext.LogImportWarning](/engine/6000.7/script-reference/unityeditor/assetimporters/assetimportcontext/logimportwarning.md).

### Examples

```csharp
using UnityEngine;
using UnityEditor;

public class GetImportLogExample
{
    [MenuItem("Tools/GetImportLogExample")]
    static void Example()
    {
        var assetPath = "Path/To/Your/Asset";
        //Get import log for the specified asset
        var log = AssetImporter.GetImportLog(assetPath);

        //Log the import log entries
        if (log != null)
        {
            Debug.Log($"Import log for {assetPath}: {log.logEntries.Length} entries.");
            foreach (var entry in log.logEntries)
            {
                Debug.Log(entry.message);
            }
        }
        else
        {
            Debug.Log($"No import log found for {assetPath}");
        }
    }
}
```
