c# logging with serilog | logging in dot net core (read pinned comment)

preview_player
Показать описание
How to implement logging in dot bet core with serilog.
It is a complete tutorial of serilog in dot net core 7. This tutorial is applicable for both .net 6 and .net 7. Here we will learn how we can implement logging

with serilog in .net 7. Lets understand what serilog is

🖋 Serilog is a third party library for logging in .net.

🖋 We can log information into console,file or database with serilog.

Hit the 👍 if you like the video.

.................

Please share this video to your circle to support me.

Other links:

.......................................................

connect with me

..........................................

#serilog #dotnetcore #dotnet7
Рекомендации по теме
Комментарии
Автор

I have removed hard coded logger settings from program.cs file and put them into appsettings.json. Because that can be a bad practice, so kindly update program.cs and appsettings.json files from github repo.

ravindradevrani
Автор

It was really helpful, thank you so much. You really saved everyone's time.

sriramk
Автор

Thanks for your video. In addition to using the console and file logger, I also need to write logs to the event viewer. What addition should I made to the appsettings.json? Also, does this serilog configuration the same with blazor server projects?

Thanks in advance

faustoluis
Автор

Thanks, Is there any video about how can I get the logs that I have stored in the database using a serilog ?
I have to create a page and display data on it

sajsoujeh
Автор

please add video to log Oracle DB using .Net Core 7.

lakshminaidu
Автор

Hello Ravi,

Nice and helpful video. Just have 1 query, ILogger is from which namespace? Microsoft or serilog?

sanjay-narod
Автор

Thanks for the video, quick question, when you inject `ILogger<PersonController> logger` into the `PersonController` class, how can you inject Ilogger of Type `PersonController` into the same class `PersonController`, it seems to me as it going into circular loop as If we create an Object of PersonController whcih has one property of `_logger` that is actually Ilogger of same class type, any thoughts?

age.vampire