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
At Pluralsight, we believe everyone should have the opportunity to create progress through technology and develop the skills of tomorrow. With assessments, learning paths and courses authored by industry experts, our platform helps businesses and individuals benchmark expertise across roles, speed up release cycles and build reliable, secure products.

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