< Summary - Kestrun — Combined Coverage

Information
Class: Public.Logging.enrichers.Add-KrEnrichProcessName
Assembly: Kestrun.PowerShell.Public
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Logging/enrichers/Add-KrEnrichProcessName.ps1
Tag: Kestrun/Kestrun@9d3a582b2d63930269564a7591aa77ef297cadeb
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 28
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

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Logging/enrichers/Add-KrEnrichProcessName.ps1

#LineLine coverage
 1<#
 2    .SYNOPSIS
 3        Adds the process name to the log context.
 4    .DESCRIPTION
 5        Adds the process name to the log context, allowing it to be included in log events.
 6    .PARAMETER LoggerConfig
 7        Instance of LoggerConfiguration
 8    .INPUTS
 9        None
 10    .OUTPUTS
 11        LoggerConfiguration object allowing method chaining
 12    .EXAMPLE
 13        PS> New-KrLogger | Add-KrEnrichProcessName | Register-KrLogger
 14#>
 15function Add-KrEnrichProcessName {
 16    [KestrunRuntimeApi('Everywhere')]
 17    [OutputType([Serilog.LoggerConfiguration])]
 18    [CmdletBinding()]
 19    param(
 20        [Parameter(Mandatory = $true, ValueFromPipeline = $true)]
 21        [Serilog.LoggerConfiguration]$loggerConfig
 22    )
 23
 24    process {
 025        return [Serilog.ProcessLoggerConfigurationExtensions]::WithProcessName($loggerConfig.Enrich)
 26    }
 27}
 28

Methods/Properties

Add-KrEnrichProcessName()