Documentation Center

Configuring logging for your Audience Manager Web application (ASP.NET)

Audience Manager logging uses .NET tracing to write its log messages and requires standard .NET configuration settings.

Procedure

To enable logging in your API (RESTful) .NET Web application, open the Web application's web.config and in a plain-text or XML editor, add:
<system.diagnostics>
  <sources>
    <source name="AudienceManagerLogger" switchName="sourceSwitch">
      <listeners>
        <add name="RollingFlatFileTraceListener" />
      </listeners>
    </source>
  </sources>
  <sharedlisteners>
    <add initializeData=".\logs\AudienceManager.log" rollSizeKb="102400" timestampPattern="yyyy-MM-dd"
     rollFileExistsBehavior="Increment" rollInterval="Midnight" maxArchivedFiles="0"
     type="Sdl.AudienceManager.ContentDelivery.Logging.TraceListeners.RollingFlatFileTraceListener,
     Sdl.AudienceManager.ContentDelivery" name="RollingFlatFileTraceListener" />
  </sharedListeners>
  <switches>
    <add name="sourceSwitch" value="Verbose" />
  </switches>
  <trace autoflush="true" />
 </system.diagnostics>