PreEmptive Analytics Data Hub User Guide


During installation, the Endpoint Web Service and Dispatch Service are both configured to log warning and error messages to the Windows Event Log, using the NLog logging platform. This configuration can be modified to display more detailed logging, or to log to other targets such as log files.

To modify the logging configuration:

  1. Open [Application folder]\Web\Endpoint\NLog.config for the Endpoint Web Service, or [Application folder]\DispatchService\NLog.exe.config for the Dispatch Service.
  2. Modify the NLog configuration file according to your needs.
  3. Save the file.
  4. No restart should be required - the changes will be picked up automatically.

If your logging configuration changes have problems (e.g. invalid syntax), those errors will be logged to C:\ProgramData\PreEmptive Solutions\PreEmptive Analytics Data Hub, in endpoint-nlog-errors.txt or dispatch-nlog-errors.txt.

Example: Configuring the Endpoint Web Service to log INFO-level messages to file

<?xml version="1.0" encoding="utf-8"?>
<nlog xmlns=""
  internalLogFile="C:\ProgramData\PreEmptive Solutions\PreEmptive Analytics Data Hub\endpoint-nlog-errors.txt"
  internalLogLevel="Warn" autoReload="true">
    <target name="warns"
              layout="${longdate}|${level:uppercase=true}|${logger}|${message}  ${exception:separator=&#xD;&#xA;:format=message,tostring}"
              log="PA Data Hub"/>
    <target name="logfile"
              fileName="C:\ProgramData\PreEmptive Solutions\PreEmptive Analytics Data Hub\endpoint-${shortdate}.log"
    <logger name="*" minlevel="Warn" writeTo="warns"/>
    <logger name="*" minlevel="Info" writeTo="logfile" />

Note: The Dispatch Service logging deliberately omits logging from the "ServiceClientBase" logger, as it is redundant with more detailed information provided by the "PaHub.MessageDispatch".

Data Hub Version 1.5.0. Copyright © 2015 PreEmptive Solutions, LLC