Logging (Tutorial Index)

This tutorial section will contain hands-on chapters for configuring logging in step with building a server. The in-depth conceptual guide has moved to: Logging Guide.

Chapters

Order Chapter Focus
1 Simple Logging Create a single named logger & write events
2 Multiple Loggers & Levels Separate audit/debug pipelines
3 Enrichment & Correlation IDs Add static & dynamic properties
4 Sinks Console/File/Seq/HTTP sinks
5 Sinks (Advanced) Additional sink options & patterns
6 Hot Reload Reconfigure log levels without restart
7 Apache Common Access Log Classic Apache CLF request middleware

Quick Start (Preview)

New-KrLogger -Name 'demo' -Level Information |
    Add-KrSink -Type Console -Options @{} |
    Register-KrLogger

Write-KrLog -Name 'demo' -Level Information -Message 'Hello {Name}' -Arguments 'World'

More examples: see the Logging Guide.


Next

Continue with: Shared Variables or return to the main Tutorial Index.


Table of contents