У нас вы можете посмотреть бесплатно Logging to file in asp net core using nlog или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
In this video we will discuss how to log to a file in ASP.NET Core using NLog. Text version of the video https://csharp-video-tutorials.blogsp... Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking. / @aarvikitchen5572 Slides https://csharp-video-tutorials.blogsp... ASP.NET Core Text Articles & Slides https://csharp-video-tutorials.blogsp... ASP.NET Core Tutorial • ASP.NET core tutorial for beginners Angular, JavaScript, jQuery, Dot Net & SQL Playlists https://www.youtube.com/user/kudvenka... ASP.NET Core supports several third-party logging providers like the following NLog Serilog elmah Sentry JSNLog If we know how to work with one of the third-party logging providers, working with the other's is similar. To use NLog in ASP.NET Core Step 1 : Install NLog.Web.AspNetCore nuget package Once the NLog package is iinstalled, you will see the PackageReference included in the .csproj file Step 2 : Create nlog.config file Create nlog.config file in the root of your project. Please use the configuration available at the following link. https://csharp-video-tutorials.blogsp... To learn more about the nlog.config file please refer to the following github wiki page https://github.com/NLog/NLog/wiki/Con... Step 3 : Enable copy to bin folder Right click on nlog.config file in the Solution Explorer and select Properties. In the Properties window set Copy to Output Directory = Copy if newer Step 4 : Enable NLog as one of the Logging Provider In addition to using the default logging providers (i.e Console, Debug & EventSource), we also added NLog using the extension method AddNLog(). This method is in NLog.Extensions.Logging namespace. public class Program { public static void Main(string[] args) { CreateWebHostBuilder(args).Build().Run(); } public static IWebHostBuilder CreateWebHostBuilder(string[] args) =] WebHost.CreateDefaultBuilder(args) .ConfigureLogging((hostingContext, logging) =] { logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging")); logging.AddConsole(); logging.AddDebug(); logging.AddEventSourceLogger(); // Enable NLog as one of the Logging Provider logging.AddNLog(); }) .UseStartup[Startup](); } If you want only NLog as the logging provider, clear all the logging providers and then add NLog. public class Program { public static void Main(string[] args) { CreateWebHostBuilder(args).Build().Run(); } public static IWebHostBuilder CreateWebHostBuilder(string[] args) =] WebHost.CreateDefaultBuilder(args) .ConfigureLogging((hostingContext, logging) =] { // Remove all the default logging providers logging.ClearProviders(); logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging")); // Add NLog as the Logging Provider logging.AddNLog(); }) .UseStartup[Startup](); } Next video : Control what is logged using the LogLevel configuration setting.