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
ASP.NET Core and Vue.js

You're reading from   ASP.NET Core and Vue.js Build real-world, scalable, full-stack applications using Vue.js 3, TypeScript, .NET 5, and Azure

Arrow left icon
Product type Paperback
Published in Jun 2021
Publisher Packt
ISBN-13 9781800206694
Length 478 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Devlin Basilan Duldulao Devlin Basilan Duldulao
Author Profile Icon Devlin Basilan Duldulao
Devlin Basilan Duldulao
Arrow right icon
View More author details
Toc

Table of Contents (25) Chapters Close

Preface 1. Section 1: Getting Started
2. Chapter 1: Getting Started with ASP.NET Core and Vue.js FREE CHAPTER 3. Chapter 2: Setting Up a Development Environment 4. Section 2: Backend Development
5. Chapter 3: Starting Your First ASP.NET Core Project 6. Chapter 4: Applying Clean Architecture to an ASP.NET Core Solution 7. Chapter 5: Setting Up DbContext and Controllers 8. Chapter 6: Diving into CQRS 9. Chapter 7: CQRS in Action 10. Chapter 8: API Versioning and Logging in ASP.NET Core 11. Chapter 9: Securing ASP.NET Core 12. Chapter 10: Performance Enhancement with Redis 13. Section 3: Frontend Development
14. Chapter 11: Vue.js Fundamentals in a Todo App 15. Chapter 12: Using a UI Component Library and Creating Routes and Navigations 16. Chapter 13: Integrating a Vue.js Application with ASP.NET Core 17. Chapter 14: Simplifying State Management with Vuex and Sending GET HTTP Requests 18. Chapter 15: Sending POST, DELETE, and PUT HTTP Requests in Vue.js with Vuex 19. Chapter 16: Adding Authentication in Vue.js 20. Section 4: Testing and Deployment
21. Chapter 17: Input Validations in Forms 22. Chapter 18: Writing Integration Tests Using xUnit 23. Chapter 19: Automatic Deployment Using GitHub Actions and Azure 24. Other Books You May Enjoy

Logging in ASP.NET Core

Sometimes we assume an ideal world where our backend application runs successfully. However, in the real world, there are always events or errors to be expected. For instance, our connection to SQL Server may drop for whatever reason. To do our part, as a best practice, we should expect errors and handle them properly.

Logging is where you print lines of output as your application runs that give you some info about the usage, performance, errors, and diagnostics of your application. In short, the output tells us the story of what is going on internally in the application.

So how do we do this in ASP.NET Core?

Logging in ASP.NET Core

If you have ever done any work with ASP.NET Core, you have probably seen the ILogger interface. Perhaps, you even know that ASP.NET Core has logging built in by default. But do you know that we can configure it or replace it? Yes, we can use third-party libraries such as Serilog or NLog, which you will see shortly. But...

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 €18.99/month. Cancel anytime