Skip to main content
Version: 4.1 (2026 H2)

Logging

primedocs logs with NLog. Every server application and every component of primedocs Desktop writes its own log files. Warnings and errors of the server applications can additionally be written centrally to the operation database. This page describes what is logged where and how logging is configured. How to collect the files for a support request is shown in Server Logs and Client Logs.

Overview​

SourceLocationFileLogged levelsTimestamps
Server applicationsInstallation folder of the respective applicationserverApp.oologInfo and aboveUTC
Server applications, optionalOperation database, table NLog—Warn and aboveUTC
primedocs DesktopLog folder of the user, see Setting the log folderPrimeDocs.Client.txtallLocal time
Office COM add-insSame folder as primedocs DesktopPrimeDocs.AddIn.*.txtallLocal time

Connect calls appear in the log of the processing component, i.e. the Connect service, the Web API or primedocs Desktop. primedocs Desktop can additionally record the Connect calls it receives, see Connect log and Connect Logs. Which templates are used is not recorded in the technical log but in the usage log in the database.

Server applications​

Each server application has its own NLog.config in its installation folder and writes the file serverApp.oolog next to it.

  • Rotation: A new file is started every day. Earlier days are kept as serverApp.<n>.oolog, the lowest number being the most recent day. At most seven archived files are kept, older ones are deleted.
  • Levels: The file receives messages of the levels Info, Warn, Error and Fatal. Messages from Microsoft components (ASP.NET Core, Entity Framework Core) only appear from Warn upwards.
  • Line format: Timestamp in UTC, machine name, level, message and, where applicable, the full exception.
tip

Server log timestamps are in UTC, client log timestamps in local time. Take the time difference into account when matching server and client logs (in Switzerland one hour in winter, two hours in summer).

Applications and log folders​

So that the DataSourceAdminApp can display the files and download them as a ZIP, each application under apps in the primedocs.config carries the attribute logFilePath. A relative path refers to the folder of the primedocs.config. The attribute only defines where the files are read from. Where they are written is determined by the NLog.config of the application.

Application (type)PurposelogFilePath (default)Value in the Application column
Appprimedocs Web, Office web add-insApp\Client
AdminAppWeb AdminAdmin\AdminApp
WebApiWeb API, including Admin API and Connect APIWebApi\WebApi
ServiceSynchronisation of primedocs DesktopService\Service
IdentityServerSign-inIdS\IdS
AddressServiceServer-side Address ProvidersAddressService\AddressService
ConnectConnect service (/api/v1/Connect)Connect\Connect
McpMCP serverMcp\Mcp
JobHostUser synchronisation and background jobsJobHost\JobHost
DataSourceAdminAppAdmin DashboardDataSourceAdminApp\never writes to the database
HealthMonitorHealth MonitorHealthMonitor\never writes to the database

The IdentityServer for Windows authentication, if installed, also writes a serverApp.oolog to its installation folder and appears in the database as IdSAuth. On Azure, the JobHost runs as a WebJob from a temporary copy. Its log file is therefore not located in the JobHost\ folder there, but its warnings and errors can be evaluated through logging to the database.

Changing log location and level​

Location, retention and levels can be changed in the NLog.config of the respective application, for example a different minlevel in the rule for the file target to temporarily write Debug messages as well. The syntax is described in the NLog documentation.

  • Different location: In the file target, replace ${basedir} with the desired folder and update logFilePath in the primedocs.config accordingly. Each application needs its own folder. Keep the .oolog file extension, because the Admin Dashboard only shows and downloads *.oolog files. The procedure for a read-only application directory is described in Read-only application directory.
  • Updates: The update script compares each NLog.config with the version in the update package and, if they differ, asks whether to replace or keep the file, see Update primedocs server.
warning

Verbose levels such as Debug or Trace produce large files and can log content from documents and data sources. Only enable them for troubleshooting and reset them afterwards.

Logging to the database​

If databaseLoggingEnabled="true" is set on the root element of the primedocs.config, the server applications additionally write warnings, errors and fatal errors to the NLog table of the operation database (operationDbConnectionString). The log files are still written. DataSourceAdminApp and Health Monitor never write to the database.

<primedocs operationDbConnectionString="..."
databaseLoggingEnabled="true">
...
</primedocs>

Each entry contains machine name, application (column Application, see table above), time in UTC, level, message, logger, call site and exception. This requires the Database target to be present unchanged in the NLog.config.

The entries are evaluated in two places:

  • Admin Dashboard: The LOGGING tab on the start page only appears when database logging is enabled. It shows the latest 1000 entries, filters for the Error level (Show only Errors), marks individual entries as read (Mark as Read) and deletes all entries (Delete All Logs).
  • Health Monitor: Unread entries of the levels Warn and Error from the last 24 hours are included in the status. Entries marked as read no longer count, see Application Log.

Retention​

On every run without parameters, the JobHost deletes all entries of the NLog table that are older than 14 days, provided database logging is enabled. The cleanup can be started on its own with primedocs.JobHost.exe RemoveOldLogEntries. The period is fixed and cannot be configured.

primedocs Desktop and Office COM add-ins​

primedocs Desktop and the Office COM add-ins write to a shared log folder per user. There is one file per component:

FileComponent
PrimeDocs.Client.txtprimedocs Desktop, including client-side Connect processing
PrimeDocs.AddIn.Word.txtWord add-in for classic templates
PrimeDocs.AddIn.Common.Word.txtWord add-in for the new template types and Snippets
PrimeDocs.AddIn.Common.Excel.txtExcel add-in
PrimeDocs.AddIn.Common.PowerPoint.txtPowerPoint add-in
PrimeDocs.AddIn.Outlook.txtOutlook add-in
  • Rotation: As on the server, one file per day with at most seven archived files (PrimeDocs.Client.<n>.txt etc.).
  • Levels: Everything is logged, including Trace and Debug.
  • Line format: Timestamp in local time, logger, Windows user, machine name, process ID and message. The add-ins for the new template types also write the level.
  • Opening: In primedocs Desktop under primedocs › Help › Open log directory, see Client Logs.

Setting the log folder​

The log folder is set during installation, see Client Installation:

  • Interactive installation: The log folder follows the cache folder chosen in the installation dialog. With the preselected Local directory it is %LOCALAPPDATA%\primedocs\Logs, with Roaming directory %APPDATA%\primedocs\Logs and with Custom <cache folder>\primedocs\Logs.
  • Installation without dialogs: The MSI property LOGFOLDER determines the folder. It accepts NLog placeholders such as ${specialfolder:LocalApplicationData}. Without it, ${specialfolder:ApplicationData}/primedocs/Logs applies, i.e. %APPDATA%\primedocs\Logs.
  • Update: The installer takes the folder from the NLog.config of primedocs Desktop and writes it to the configuration of primedocs Desktop and all Office COM add-ins. A LOGFOLDER passed during the update is not taken into account.

Connect log​

To analyse Connect calls, primedocs Desktop can save every Connect call it receives as a separate file. The recording is switched on under primedocs › Options › primedocs Connect with Enable logging and ends automatically 24 hours after activation for data protection reasons.

  • Location: %TEMP%\primedocsConnectLogger, one file per call, named after the time in UTC (yyyyMMdd_HHmmss_fff.txt).
  • Content: The received Connect XML. It can contain personal data.
  • Opening: With Open Connect log folder in the same area.