Ser*_*kiy 10
NLog analog of log4net's appenders will be target. For creating your own target, you have to inherit from NLog.Targets.TargetWithLayout. Also you should mark your target class with attribute TargetAttribute:
[Target("Foo")]
public class FooTarget : TargetWithLayout
{
protected override void Write(LogEventInfo logEvent)
{
Console.WriteLine(logEvent.Message);
}
}
Run Code Online (Sandbox Code Playgroud)
Next step is adding assembly where your class is defined to NLog extensions:
<nlog>
<extensions>
<add assembly="MyBarAssembly"/>
</extensions>
<targets>
...
Run Code Online (Sandbox Code Playgroud)
And last step - registering your target (NLog will search in extensions for types market by TargetAttribute)
<target name="foo" type="Foo"/>
Run Code Online (Sandbox Code Playgroud)