Betatalks #95 - .NET Essentials: Logging in .NET (Part 1)
Betabit Betabit
425 subscribers
133 views
8

 Published On Mar 13, 2024

https://www.betabit.nl/en/betatalks

Steven and Gerben talk about logging in .NET in this two-part episode. During this first part, they demonstrate how to use Microsoft's Logging Extensions in a demo ASP.NET Core project with minimal API's in C# 8. They talk about logging fundamentals using structured messages and the LoggerMessage attribute, using log properties to customize logging, and ignoring properties for security reasons. They explain Tag Providers as a way to separate logging functionality from business entities. Steven emphasizes that separating concerns like logging from domain models is an important practice.

Links for more information:
Repository demo project: https://github.com/steven-hack/DotNet...

Timestamps
00:00 - Introduction
01:45 - Demo project
02:24 - The basics
06:24 - LoggerMessage
09:51 - Log properties
11:08 - Ignoring properties
12:39 - Tag Providers
16:01 - Closing remarks

Join us on our Discord channel:   / discord  

There is more to come!

https://www.betabit.nl/en

show more

Share/Embed