C# Logging with Serilog and Seq - Structured Logging Made Easy

Share
Embed
  • Loading...
  • Published on:  Monday, November 11, 2019
  • Structured event logging is so much more than just writing a message to a file. Since .NET Core natively supports structured event logging, I wanted to introduce a logger that takes advantage of these additional features. Serilog is an easy to configure and easy to use logging system that you can plug into a .NET Core project within minutes. Today we are going to configure Serilog, see how to use it in a basic logging scenario, then take advantage of the structured logging by hooking up a visual event sink called Seq.

    Patreon: https://www.patreon.com/IAmTimCorey
    Mailing List: https://signup.iamtimcorey.com/
    Intro to Logging: https://www.faceclips.net/video/oXNslgIXIbQ/video.html
    Getting Started with Docker: https://www.iamtimcorey.com/p/getting-started-with-docker/
    Source Code: https://leadmagnets.app/?Resource=LoggingWithSerilog

    0:00 - Intro
    1:29 - Getting started: ASP .NET Core application
    4:18 - Built in logging system crash course
    8:08 - Exceptions in log messages (built in)
    10:27 - Additional information in log message: variables in the log message (built in)
    13:42 - Setting up Serilog
    17:33 - Serilog NuGet references and configuration
    21:38 - Logging application start and crash with Serilog
    24:35 - Use Serilog over default built in logging system
    25:00 - appsetings.json
    29:47 - Serilog Enrichers: settings and NuGet references
    32:27 - Writing the log messages to Console
    34:29 - Logging request messages
    38:11 - Writing the log messages to text file
    40:49 - Structured logging: writing the log messages to json file
    46:42 - Seq
    48:39 - Setting up Seq with docker: NuGet reference, configuration, docker setup
    59:15 - Logging with Seq
    1:02:34 - Summary and concluding remarks
  • Source: https://youtu.be/_iryZxv8Rxw
Loading...

Comment