Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Minimal APIs in ASP.NET Core

You're reading from   Mastering Minimal APIs in ASP.NET Core Build, test, and prototype web APIs quickly using .NET and C#

Arrow left icon
Product type Paperback
Published in Oct 2022
Publisher Packt
ISBN-13 9781803237824
Length 240 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Marco Minerva Marco Minerva
Author Profile Icon Marco Minerva
Marco Minerva
Emanuele Bartolesi Emanuele Bartolesi
Author Profile Icon Emanuele Bartolesi
Emanuele Bartolesi
Andrea Tosato Andrea Tosato
Author Profile Icon Andrea Tosato
Andrea Tosato
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Part 1: Introduction
2. Chapter 1: Introduction to Minimal APIs FREE CHAPTER 3. Chapter 2: Exploring Minimal APIs and Their Advantages 4. Chapter 3: Working with Minimal APIs 5. Part 2: What’s New in .NET 6?
6. Chapter 4: Dependency Injection in a Minimal API Project 7. Chapter 5: Using Logging to Identify Errors 8. Chapter 6: Exploring Validation and Mapping 9. Chapter 7: Integration with the Data Access Layer 10. Part 3: Advanced Development and Microservices Concepts
11. Chapter 8: Adding Authentication and Authorization 12. Chapter 9: Leveraging Globalization and Localization 13. Chapter 10: Evaluating and Benchmarking the Performance of Minimal APIs 14. Index 15. Other Books You May Enjoy

Summary

In this chapter, we have seen several logging aspects of the implementation of minimal APIs.

We started to appreciate the ASP.NET churned logging framework, and we understood how to configure and customize it. We focused on how to define a message template and how to avoid errors with the source generator.

We saw how to use the new provider to serialize logs with the JSON format and create a custom provider. These elements turned out to be very important for mastering the logging tool and customizing it to your liking.

Not only was the application log mentioned but also the infrastructure log, which together with Application Insights becomes a key element to monitoring your application. Finally, we understood that there are ready-made tools, such as Serilog, that help us to have ready-to-use functionalities with a few steps thanks to some packages installed by NuGet.

In the next chapter, we will present the mechanisms for validating an input object to the API...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime