Tests/SampleConfigs/octopus.server.exe.nlog-with-valid-configuration.xml

<?xml version="1.0" encoding="utf-8" ?>
<nlog
  xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  autoReload="true"
  throwExceptions="false"
  internalLogLevel="Warn"
  internalLogToConsole="true">
 
  <extensions>
    <add assembly="Octopus.Shared"/>
    <add assembly="Octopus.Server"/>
    <add assembly="Seq.Client.NLog"/>
  </extensions>
 
  <variable name="appName" value="Octopus" />
  <variable name="messageLayout" value="${message}${onexception:${newline}${exception:format=ToString}}"/>
  <variable name="normalLayout" value="${longdate} ${processid:padding=5} ${threadid:padding=5} ${uppercase:${level}:padding=5} ${messageLayout}"/>
 
  <targets async="false">
    <target name="octopus-log-file" xsi:type="File"
        layout="${normalLayout}"
        fileName="${octopusLogsDirectory}/OctopusServer.txt"
        archiveFileName="${octopusLogsDirectory}/OctopusServer.{#}.txt"
        archiveEvery="Day"
        archiveNumbering="Rolling"
        maxArchiveFiles="7"
        concurrentWrites="true"
        keepFileOpen="false" />
 
    <target xsi:type="ColoredConsole" name="stdout" layout="${messageLayout}" />
    <target xsi:type="ColoredConsole" name="stderr" errorStream="true" layout="${messageLayout}" />
    <target xsi:type="EventLog" name="eventlog" source="${appName}" layout="${normalLayout}" />
    <target xsi:type="RecentInMemory" name="recent" bufferSize="100" />
    <target name="seq" xsi:type="Seq" serverUrl="https://seq.example.com">
      <property name="Application" value="Octopus" />
      <property name="Server" value="MyServer" />
    </target>
  </targets>
 
  <rules>
    <logger name="LogFileOnlyLogger" writeTo="octopus-log-file" final="true" />
    <logger name="*" minlevel="Info" writeTo="octopus-log-file" />
    <logger name="*" minlevel="Fatal" writeTo="eventlog" />
    <logger name="*" minlevel="Warn" writeTo="recent" />
    <logger name="*" minlevel="Info" maxLevel="Warn" writeTo="stdout" />
    <logger name="*" minlevel="Error" writeTo="stderr" />
    <logger name="*" minlevel="Info" writeTo="seq" />
  </rules>
</nlog>