< Summary - Kestrun — Combined Coverage

Information
Class: Public.Logging.core.New-KrLogger
Assembly: Kestrun.PowerShell.Public
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Logging/core/New-KrLogger.ps1
Tag: Kestrun/Kestrun@2d87023b37eb91155071c91dd3d6a2eeb3004705
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 25
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 08/26/2025 - 01:25:22 Line coverage: 100% (1/1) Total lines: 24 Tag: Kestrun/Kestrun@07f821172e5dc3657f1be7e6818f18d6721cf38a09/04/2025 - 22:37:32 Line coverage: 100% (1/1) Total lines: 25 Tag: Kestrun/Kestrun@afb7aadc0a8a42bfa2b51ea62c8a6e2cf63faec610/13/2025 - 16:52:37 Line coverage: 0% (0/1) Total lines: 25 Tag: Kestrun/Kestrun@10d476bee71c71ad215bb8ab59f219887b5b4a5e

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Logging/core/New-KrLogger.ps1

#LineLine coverage
 1<#
 2    .SYNOPSIS
 3        Creates a new instance of Serilog.LoggerConfiguration.
 4    .DESCRIPTION
 5        Creates a new instance of Serilog.LoggerConfiguration that can be used to configure logging sinks and enrichers.
 6    .INPUTS
 7        None. You cannot pipe objects to New-KrLogger.
 8    .OUTPUTS
 9        Instance of Serilog.LoggerConfiguration.
 10    .EXAMPLE
 11        PS> $loggerConfig = New-KrLogger
 12        Creates a new logger configuration instance that can be used to add sinks and enrichers.
 13    .EXAMPLE
 14    PS> $loggerConfig = New-KrLogger | Add-KrSinkConsole | Add-KrEnrichProperty -Name 'ScriptName' -Values 'Test'
 15        Creates a new logger configuration instance, adds a console sink, and enriches logs with a property.
 16#>
 17function New-KrLogger {
 18    [KestrunRuntimeApi('Everywhere')]
 19    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
 20    [CmdletBinding()]
 21    [OutputType([Serilog.LoggerConfiguration])]
 22    param()
 023    return [Serilog.LoggerConfiguration]::New()
 24}
 25

Methods/Properties

New-KrLogger()