Simple play icon Course
Skills

.NET 4 Logging Done Right: An Opinionated Approach Using Serilog 2

by Erik Dahl

Establish a great logging framework for all of your applications using Serilog as a foundation, then get them written to database sinks (SQL Server and Elasticsearch specifically), and explore log data using custom and in-the-box tools.

What you'll learn

Establishing a foundational framework for logging can save hours in troubleshooting and provide valuable insights to both utilization and performance within all of your applications.

In this course, .NET Logging Done Right: An Opinionated Approach Using Serilog, you will learn about 4 primary "things" (usage, performance, errors, and diagnostics) to log and how to log them. You will also learn how to globally write these log entries without needing to inject logging code everywhere in an application – so developers can focus on business logic, not logging code.

Global logging will be shown with all flavors of

  • ASP.NET
  • WPF applications
  • WCF services, and
  • TypeScript/JavaScript applications
Lastly, you will see techniques for searching, exploring, and visualizing log entries that you will have written to both SQL Server and to Elasticsearch to gain insight into the application, its usage, and how it's performing.

By the end this course, you’ll know how to create a great logging framework that will provide huge benefits to you and many other people who have a stake in your applications

Table of contents

Course Overview
1min

Course FAQ

What is Serilog?

Serilog is a logging framework integrated with .NET applications for recording diagnostic logs into files and SQL/NoSQL databases

What are some benefits of Serilog?

Some of the benefits of Serilog include:

  • diagnostic logging into files, console, and elsewhere
  • Easy to set up
  • Clean API
  • Portable between .NET platforms
  • Powerful structured event data
What will I learn in this course?

In this course you will learn about:

  • An introduction to Serilog
  • Goals of good logging
  • What to log and how to log it
  • Global Logging in ASP.NET MVC and web forms
  • Global Logging in JavaScript/TypeScript
  • Global Logging in ASP.NET Core
  • Global Logging with WPF and WCF
  • Usage, performance, errors, and diagnostics
  • Search, explore, and visualize log entries
  • Much more
Who is this course for?

This course is intended for those who want to learn Serilog and its approach to .NET Logging. Especially useful for people who want to minimize situations where they have to reproduce problems in their applications or jump on escalated issues to troubleshoot.

What are the prerequisites for this course?

This is an intermediate level course, so it assumes some previous exposure to working with application development, including troubleshooting and fixing issues in applications. Familiarity with ASP.NET, MVC, Web forms, JavaScript, WPF and WCF will come in handy.

About the author

Erik Dahl has been developing software and architecture for 20+ years, mostly doing in-house development for his employers. His recent work has included a multi-tenant B2B implementation and self-registration B2C implementation for Duende IdentityServer, upgrading legacy ASP.NET websites from server-side technologies to a client/server mix and adopting TypeScript, building Web APIs as the back end for mobile and web applications, and finding ways to modernize existing applications and make them ... more

Ready to upskill? Get started