Skip to main content
Version: Next

Log Configuration

ImportDocs uses the NLog logging framework to provide detailed tracking of each import operation. This allows great flexibility in the destination and format of messages (log files, emails, database, etc.).

Configuration Files

Each execution mode has its own .nlog configuration file located in the same directory as the executable:

  • ImportDocs.exe.nlog (Graphical version)
  • ImportDocsConsole.exe.nlog (Console version)
  • Avanteam.WindowService.Scheduler.exe.nlog (Scheduled agents within the Scheduler service)

NLog File Structure

This is an XML file structured mainly around two tags:

  1. Targets: Defines where to send logs (e.g., an ImportDocs.log file).
  2. Rules: Defines which level of log (Info, Warn, Error) to send to which target.

Default Configuration Example

<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd">
<targets async="true">
<target name="file" xsi:type="File"
fileName="${basedir}/logs/ImportDocs.log"
archiveAboveSize="10485760"
maxArchiveFiles="5" />
</targets>
<rules>
<logger name="*" minlevel="Info" writeTo="file" />
</rules>
</nlog>

Log Levels

You can filter logs according to their importance:

  • Trace / Debug: Verbose information for technical debugging.
  • Info: General information about the execution flow.
  • Warn: Non-blocking alerts (e.g., empty field ignored).
  • Error: Errors blocking the import of a specific document.
  • Fatal: Critical error completely stopping the tool.

Viewing Logs

By default, when using the graphical interface, you can see logs displayed in real time. For post-analysis, go to the /logs/ subfolder or to the path specified in your application's configuration file.

Note

If you customize the tool with C# code, you can add your own log calls via the Log object (e.g., Log.Info("Starting specific processing");).