# OCR Diagnostic Logs

> Enable and collect OCR engine diagnostic logs in UiPath by adding configuration to NLog.config to capture vision host errors.

The UiPath.Vision.Host Diagnostic logs enable you to collect information regarding OCR engine errors.

## Enabling UiPath.Vision.Host Diagnostic Logs

To collect information regarding OCR errors, you can enable the generation of the diagnostic log files by adding the following lines to the `<Installation Folder>\NLog.config` file:

`<target xsi:type="File" name="visionHostFile" fileName="${LogDirectory}/${shortdate}_VisionHost.log" layout="${time} ${level} ${message}" concurrentWrites="true" />`

`<logger name="UiPath.Vision.Host.exe" minLevel="Trace" writeTo="visionHostFile" final="true" />`

:::note
Editing the `NLog.config` file requires administrator permissions.
:::

## Targets of the UiPath.Vision.Host Diagnostic Logs

The log files are generated at the path specified in the `<Installation Folder>\NLog.config`, under the `visionHostFile` parameter. The default value is `%localappdata%\UiPath\Logs\${shortdate}_VisionHost.log`.

:::note
Editing the `NLog.config` file requires administrator permissions.
:::
