Skip to main content
CourseFlix

.NET Logging Done Right: An Opinionated Approach Using Serilog

5h 2m 40s
English
Paid

This course shows you how to use Serilog to build clear and useful logs in your .NET apps.You will learn what to log, how to log it, and how to read the results with ease.

What You Learn

You explore four key areas to log. These areas are usage, performance, errors, and diagnostics. You see why each area matters and how it can guide your work.

Logging Focus Areas

Usage

You learn how to track what users do in your app. This helps you see patterns and find weak spots.

Performance

You measure how long parts of your app take to run. This helps you spot slow code early.

Errors

You record clear error details. This helps you fix issues fast and avoid repeat bugs.

Diagnostics

You capture context about your app at run time. This gives you a full picture when problems appear.

Global Logging Setup

You set up logging in one place. You do not repeat logging code across many files. This lets you focus on your core work.

You see how to apply this setup in ASP.NET, WPF, WCF, and TypeScript or JavaScript apps. Each example shows where logs start and how data flows.

Search and View Logs

You learn how to store logs in SQL Server and Elasticsearch. You also learn how to search, filter, and view the data. These tools help you explore your app and measure how it runs.

Practical Outcomes

By the end, you know how to design a solid logging plan. Your logs will be clear, useful, and easy to review. This helps you and the teams who depend on your work.

About the Author: Pluralsight

Pluralsight thumbnail

Pluralsight is one of the largest enterprise-focused online technology training platforms in the world, founded in 2004 by Aaron Skonnard and acquired by Vista Equity Partners in 2021. The platform has historically been the dominant choice for corporate IT training, with a catalog of over 7,000 courses covering software development, IT operations, security, data, and cloud across virtually every major vendor and open-source platform.

The instructor roster includes Microsoft Regional Directors, AWS / Azure / GCP MVPs, and named experts in essentially every active technology track. Course material is structured for the corporate-training market: each course covers a specific skill at a defined depth, and Pluralsight's role-based learning paths are widely used by enterprises for upskilling engineering teams.

The CourseFlix listing under this source carries 12 Pluralsight courses — a small slice of the broader platform's catalog. Material is paid; Pluralsight itself runs on a monthly / annual subscription on the original platform, with Pluralsight Skills (individual) and Pluralsight Flow (engineering analytics) as the main product lines.

Watch Online 65 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 65 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Course Overview
All Course Lessons (65)
#Lesson TitleDurationAccess
1
Course Overview Demo
01:45
2
Define Goals and Objectives, Introduce Serilog, Outline Course
09:52
3
Introduction: What to Log and How to Log It
05:08
4
Create the Global Logger
03:31
5
Add a Performance Tracker
01:42
6
Logging with a Console App
05:37
7
Discussion: Exception Handling and Data Access
01:20
8
Data Access Before Custom Exception Handling
03:43
9
Create an ADO.NET Stored Procedure Wrapper
02:00
10
Create a Dapper Extension Method
01:29
11
Create an Entity Framework Command Interceptor
02:06
12
Verifying the Custom Data Access Exception Handling
03:41
13
Add the Procedure Name and Exception Method to Top Level of Log Entry
02:10
14
Summary
00:26
15
Introduction and Approach
03:59
16
Utility Methods: Data to Log
06:29
17
Performance Logging: Web Forms
06:13
18
Performance Logging: MVC
04:03
19
Utility Methods: Web Logging Methods
01:38
20
Error Handling: Web Forms
09:25
21
Error Handling: MVC
07:10
22
Usage and Diagnostics: Web Forms
02:38
23
Usage and Diagnostics: MVC
02:52
24
Summary
00:38
25
Introduction and Approach
05:14
26
Review of Existing WebAPI Project
10:47
27
Performance (and Usage) Logging
07:12
28
Exception Handling and Logging
10:42
29
Summary
00:43
30
Introduction and Approach
05:21
31
Introducing a JavaScript Page on a MVC Website
04:24
32
Implementing a Logging API
03:06
33
Instrumenting JavaScript Code for Logging
06:30
34
Introducing the Angular 4 App
10:31
35
Instrumenting the Angular 4 App for Logging
09:40
36
Summary
01:05
37
Introduction and Approach
02:39
38
Introducing the WPF and WCF Applications
04:52
39
Applying Logging to WPF
07:51
40
Applying Logging to WCF Using Behaviors and Attributes
13:27
41
Executing the Apps and Reviewing the Logs
05:56
42
Summary
00:54
43
Introduction
04:15
44
Demo Approach
01:51
45
MVC App: Running the Existing Code
02:02
46
MVC App: Existing Code Walkthrough
05:42
47
API: Running the Existing Code
01:51
48
API: Existing Code Walkthrough
03:44
49
Building the Utility Logging Code
06:43
50
Ad-hoc Usage and Diagnostic Logging
05:41
51
Filter-based Performance Logging
06:26
52
MVC Exception Logging with Middleware
05:09
53
API Exception Logging with Middleware
04:57
54
Summary
01:09
55
Logging Goals and Sink Options
08:41
56
Writing to a SQL Server Sink and Verifying Entries
07:42
57
Using a Custom Web Viewer to Review Log Entries
04:58
58
Using an SSRS Report as a Dashboard of Sorts
02:21
59
ELK Stack Intro and Hosting It in a Docker Image
05:05
60
Writing to an Elasticsearch and Verifying Entries
03:59
61
Configuring Index Patterns with Kibana
01:30
62
Log 'Discovery' with Kibana
04:09
63
Log 'Visualization' and 'Dashboards' with Kibana
09:10
64
Changing an Analyzed Field in Kibana
03:28
65
Summary
01:38
Unlock unlimited learning

Get instant access to all 64 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Course content

65 lessons · 5h 2m 40s
Show all 65 lessons
  1. 1 Course Overview 01:45
  2. 2 Define Goals and Objectives, Introduce Serilog, Outline Course 09:52
  3. 3 Introduction: What to Log and How to Log It 05:08
  4. 4 Create the Global Logger 03:31
  5. 5 Add a Performance Tracker 01:42
  6. 6 Logging with a Console App 05:37
  7. 7 Discussion: Exception Handling and Data Access 01:20
  8. 8 Data Access Before Custom Exception Handling 03:43
  9. 9 Create an ADO.NET Stored Procedure Wrapper 02:00
  10. 10 Create a Dapper Extension Method 01:29
  11. 11 Create an Entity Framework Command Interceptor 02:06
  12. 12 Verifying the Custom Data Access Exception Handling 03:41
  13. 13 Add the Procedure Name and Exception Method to Top Level of Log Entry 02:10
  14. 14 Summary 00:26
  15. 15 Introduction and Approach 03:59
  16. 16 Utility Methods: Data to Log 06:29
  17. 17 Performance Logging: Web Forms 06:13
  18. 18 Performance Logging: MVC 04:03
  19. 19 Utility Methods: Web Logging Methods 01:38
  20. 20 Error Handling: Web Forms 09:25
  21. 21 Error Handling: MVC 07:10
  22. 22 Usage and Diagnostics: Web Forms 02:38
  23. 23 Usage and Diagnostics: MVC 02:52
  24. 24 Summary 00:38
  25. 25 Introduction and Approach 05:14
  26. 26 Review of Existing WebAPI Project 10:47
  27. 27 Performance (and Usage) Logging 07:12
  28. 28 Exception Handling and Logging 10:42
  29. 29 Summary 00:43
  30. 30 Introduction and Approach 05:21
  31. 31 Introducing a JavaScript Page on a MVC Website 04:24
  32. 32 Implementing a Logging API 03:06
  33. 33 Instrumenting JavaScript Code for Logging 06:30
  34. 34 Introducing the Angular 4 App 10:31
  35. 35 Instrumenting the Angular 4 App for Logging 09:40
  36. 36 Summary 01:05
  37. 37 Introduction and Approach 02:39
  38. 38 Introducing the WPF and WCF Applications 04:52
  39. 39 Applying Logging to WPF 07:51
  40. 40 Applying Logging to WCF Using Behaviors and Attributes 13:27
  41. 41 Executing the Apps and Reviewing the Logs 05:56
  42. 42 Summary 00:54
  43. 43 Introduction 04:15
  44. 44 Demo Approach 01:51
  45. 45 MVC App: Running the Existing Code 02:02
  46. 46 MVC App: Existing Code Walkthrough 05:42
  47. 47 API: Running the Existing Code 01:51
  48. 48 API: Existing Code Walkthrough 03:44
  49. 49 Building the Utility Logging Code 06:43
  50. 50 Ad-hoc Usage and Diagnostic Logging 05:41
  51. 51 Filter-based Performance Logging 06:26
  52. 52 MVC Exception Logging with Middleware 05:09
  53. 53 API Exception Logging with Middleware 04:57
  54. 54 Summary 01:09
  55. 55 Logging Goals and Sink Options 08:41
  56. 56 Writing to a SQL Server Sink and Verifying Entries 07:42
  57. 57 Using a Custom Web Viewer to Review Log Entries 04:58
  58. 58 Using an SSRS Report as a Dashboard of Sorts 02:21
  59. 59 ELK Stack Intro and Hosting It in a Docker Image 05:05
  60. 60 Writing to an Elasticsearch and Verifying Entries 03:59
  61. 61 Configuring Index Patterns with Kibana 01:30
  62. 62 Log 'Discovery' with Kibana 04:09
  63. 63 Log 'Visualization' and 'Dashboards' with Kibana 09:10
  64. 64 Changing an Analyzed Field in Kibana 03:28
  65. 65 Summary 01:38

Related courses

  • Fullstack ASP.NET Core and React Masterclass | Learnify  thumbnail

    Fullstack ASP.NET Core and React Masterclass | Learnify

    By: Fullstack.io
    Learnify is a self-paced, online Masterclass, where you will master ASP.NET CORE and React by building a practical, real-world application from scratch.
    20 hours 40 minutes 31 seconds 0 / 5
  • .NET Microservices: CQRS & Event Sourcing with Kafka thumbnail

    .NET Microservices: CQRS & Event Sourcing with Kafka

    By: Udemy
    In this course, you will learn how to create .NET microservices that comply with the CQRS and Event Sourcing patterns. You will not use any CQRS framework, but
    8 hours 31 minutes 56 seconds 5 / 5
  • Full Time Game Dev thumbnail

    Full Time Game Dev

    By: Thomas Brush
    Full Time Game Dev will take you from knowing nothing about game development to making money from your indie game on the Steam store.
    35 hours 12 minutes 15 seconds

Frequently asked questions

What is .NET Logging Done Right: An Opinionated Approach Using Serilog about?
This course shows you how to use Serilog to build clear and useful logs in your .NET apps. You will learn what to log, how to log it, and how to read the results with ease. What You Learn You explore four key areas to log. These areas are…
Who teaches .NET Logging Done Right: An Opinionated Approach Using Serilog?
.NET Logging Done Right: An Opinionated Approach Using Serilog is taught by Pluralsight. You can find more courses by this instructor on the corresponding source page.
How long is .NET Logging Done Right: An Opinionated Approach Using Serilog?
.NET Logging Done Right: An Opinionated Approach Using Serilog contains 65 lessons with a total runtime of 5 hours 2 minutes. All lessons are available to watch online at your own pace.
Is .NET Logging Done Right: An Opinionated Approach Using Serilog free to watch?
.NET Logging Done Right: An Opinionated Approach Using Serilog is part of CourseFlix's premium catalog. A CourseFlix subscription unlocks the full video player; the course description, table of contents, and preview information are available to everyone.
Where can I watch .NET Logging Done Right: An Opinionated Approach Using Serilog online?
.NET Logging Done Right: An Opinionated Approach Using Serilog is available to watch online on CourseFlix at https://courseflix.net/course/net-logging-done-right-an-opinionated-approach-using-serilog. The page hosts every lesson with the integrated video player; no download is required.