Running Seq instance
docker run \
-e ACCEPT_EULA=Y \
-v /tmp/seqdb:/data \
-p 80:80 \
-p 5341:5341 \
datalust/seq:latest
In C# project, install library NLog.Targets.Seq
.
Then define nlog.config
something like this:
<?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"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="false"
throwExceptions="true"
internalLogLevel="Off" >
<targets>
<target name="seq" xsi:type="BufferingWrapper" bufferSize="1000" flushTimeout="2000">
<target xsi:type="Seq" serverUrl="http://localhost:5341" apiKey="" />
</target>
</targets>
<extensions>
<add assembly="NLog.Targets.Seq"/>
</extensions>
<rules>
<logger name="*" minlevel="Info" writeTo="seq" />
</rules>
</nlog>