# OCR Diagnostic Logs

> UiPath.Vision.Host diagnostic logs for collecting and analyzing OCR engine errors by configuring NLog.config in the Studio installation folder.

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.
:::
