.NET Standard 2.1 client for Logtail.com.
dotnet add package Logtail
You can configure our NLog target in your nlog.config
:
<?xml version="1.0" encoding="utf-8" ?>
<nlog
xmlns="<http://www.nlog-project.org/schemas/NLog.xsd>"
xsi:schemaLocation="NLog NLog.xsd"
xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>">
<extensions>
<add assembly="Logtail" />
</extensions>
<targets>
<target xsi:type="Logtail" name="logtail" sourceToken="YOUR_LOGTAIL_SOURCE_TOKEN"/>
</targets>
<rules>
<logger name="*" minlevel="Info" writeTo="logtail" />
</rules>
</nlog>
Then use your NLog logger anywhere in your app:
using System;
using NLog;
namespace YourApplication
{
class Program
{
private static Logger logger = LogManager.GetCurrentClassLogger();
static void Main(string[] args)
{
logger.Info("Hello World");
}
}
}