filmov
tv
Logging in ASP NET Core
Показать описание
In this video we will discuss Logging in ASP.NET Core.
Logging providers in ASP.NET Core
Text version of the video
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.
Slides
ASP.NET Core Text Articles & Slides
ASP.NET Core Tutorial
Angular, JavaScript, jQuery, Dot Net & SQL Playlists
A logging provider is the component that stores or displays logs. For example, the Console log provider displays logs on the console. Similarly, the Debug log provider displays logs on the Debug window in Visual Studio.
ASP.NET Core built-in logging providers
Console
Debug
EventSource
EventLog
TraceSource
AzureAppServicesFile
AzureAppServicesBlob
ApplicationInsights
Third party logging providers for ASP.NET Core
NLog
elmah
Serilog
Sentry
Gelf
JSNLog
Loggr
Stackdriver
Default logging providers in ASP.NET Core
Setting up the web server
Loading the host and application configuration from various configuration sources and
Configuring logging
Since ASP.NET Core is open source we can see the complete source on their official github page. The following is the code snippet from CreateDefaultBuilder() method.
.ConfigureLogging((hostingContext, logging) =]
{
logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
logging.AddConsole();
logging.AddDebug();
logging.AddEventSourceLogger();
})
Console
Debug
EventSource
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Information"
}
}
LogLevel is used to control how much log data is logged or displayed. We will discuss Log level in detail in our upcoming videos.
Logging providers in ASP.NET Core
Text version of the video
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.
Slides
ASP.NET Core Text Articles & Slides
ASP.NET Core Tutorial
Angular, JavaScript, jQuery, Dot Net & SQL Playlists
A logging provider is the component that stores or displays logs. For example, the Console log provider displays logs on the console. Similarly, the Debug log provider displays logs on the Debug window in Visual Studio.
ASP.NET Core built-in logging providers
Console
Debug
EventSource
EventLog
TraceSource
AzureAppServicesFile
AzureAppServicesBlob
ApplicationInsights
Third party logging providers for ASP.NET Core
NLog
elmah
Serilog
Sentry
Gelf
JSNLog
Loggr
Stackdriver
Default logging providers in ASP.NET Core
Setting up the web server
Loading the host and application configuration from various configuration sources and
Configuring logging
Since ASP.NET Core is open source we can see the complete source on their official github page. The following is the code snippet from CreateDefaultBuilder() method.
.ConfigureLogging((hostingContext, logging) =]
{
logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
logging.AddConsole();
logging.AddDebug();
logging.AddEventSourceLogger();
})
Console
Debug
EventSource
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Information"
}
}
LogLevel is used to control how much log data is logged or displayed. We will discuss Log level in detail in our upcoming videos.
Комментарии