Logtail uses a highly popular NLog logging library. You can integrate Logtail into your .NET application in just a few simple steps.
Visit our official docs to learn more about Logtail and .NET!
To use Logtail in your .NET project you need to install the following two packages. It can be done from the Visual Studio interface or command line, depending on your preferences.
In Visual Studio, open NuGet Package Manager Console by clicking Tools → NuGet Package Manager → Package Manager Console
In the opened console run the following command:
Install-Package Logtail
Then run the following command to install NLog.Extensions.Logging
package:
Install-Package NLog.Extensions.Logging
To install the Logtail
package using PowerShell, run the following command in your project’s directory:
dotnet add package Logtail
Then install NLog.Extensions.Logging
package using the following command:
dotnet add package NLog.Extensions.Logging
Download or clone the repository to your select project directory.
Open the .csproj
file in the Visual Studio. Then click on the green play button DotNetLogtail
or press F5 to run the application.
Open the command line in the projects directory and enter the following command:
dotnet run
This is the expected output:
All done! Now, you can check Logtail to see your logs