Add-KrEnrichWithProcessId
SYNOPSIS
Adds the process ID to the log context.
SYNTAX
Add-KrEnrichWithProcessId [-loggerConfig] <LoggerConfiguration> [<CommonParameters>]
DESCRIPTION
Adds the process ID to the log context, allowing it to be included in log events.
EXAMPLES
EXAMPLE 1
New-KrLogger | Add-KrEnrichWithProcessId | Register-KrLogger
PARAMETERS
-loggerConfig
Instance of LoggerConfiguration
Type: LoggerConfiguration
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
None
OUTPUTS
LoggerConfiguration object allowing method chaining
NOTES
This function is part of the Kestrun logging infrastructure and should be used to enrich log events with process information. https://github.com/serilog/serilog-enrichers-process