Serilog in .NET

Published on
Embed video
Share video
Ask about this video

Scene 1 (0s)

LOGGING LIKE A SENIOR DEVELOPER. Serilog in .NET.

Scene 2 (9s)

The "Plain Text" Trap. Beginners log strings. Production systems generate millions of them. Searching text logs for specific users or slow requests becomes an impossible needle-in-a-haystack task..

Scene 3 (28s)

Enter Serilog. FROM STRINGS TO STRUCTURED DATA.

Scene 4 (35s)

Plain Text. "User 42 logged in" is just a sequence of characters. To find it, you need complex Regex patterns and manual scanning..

Scene 5 (53s)

Searchable Properties: Instantly filter by UserID, CorrelationID, or Status Codes..

Scene 6 (1m 9s)

30-Second Setup. Quick Start. Installing Serilog is straightforward. Just add the core package and the "Sinks" (destinations) you need..

Scene 7 (1m 21s)

Step Code Implementation 1. Create Logger Log.Logger = new LoggerConfiguration()... 2. Add Sinks .WriteTo.Console().WriteTo.File("logs.txt") 3. Build Host builder.Host.UseSerilog();.

Scene 8 (1m 39s)

0%. Stop Using Interpolation. Never use $"" inside your log messages. It destroys the structure! Use property templates instead to keep your data searchable..

Scene 9 (1m 55s)

Console/File. Essential for local development and traditional server auditing..

Scene 10 (2m 13s)

Log Levels. Only use Error for real failures. Keep dashboards clean..

Scene 11 (2m 28s)

The Modern Stack. Source: .NET API. Engine: Serilog.