NLog WCF target for sending LogEvents to NLog Receiver Service (using WCF or Web Services)
-
Install the package
Install-Package NLog.WCF
or in your csproj:<PackageReference Include="NLog.WCF" Version="5.*" />
-
Add to your nlog.config:
<extensions> <add assembly="NLog.WCF"/> </extensions>
Alternative register from code using fluent configuration API:
LogManager.Setup().SetupExtensions(ext => { ext.RegisterTarget<NLog.Targets.LogReceiverWebServiceTarget>(); });
See also NLog Wiki for available options and examples.