Write-PodeLog
SYNOPSIS
Write an object to a configured custom Log Method.
SYNTAX
Write-PodeLog [-Name] <String[]> [[-Level] <String>] [-InputObject] <Object> [[-Metadata] <Hashtable>]
[[-Override] <Hashtable[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Write an object to one or more configured custom Log Methods.
EXAMPLES
EXAMPLE 1
$object | Write-PodeLog -Name 'LogTypeName'
EXAMPLE 2
$object | Write-PodeLog -Name 'LogTypeName1', 'LogTypeName2'
EXAMPLE 3
$object | Write-PodeLog -Name 'LogTypeName' -Level 'Debug' -Metadata @{ Key = 'Value' }
EXAMPLE 4
$object | Write-PodeLog -Name 'LogTypeName' -Override @(New-PodeLogEventViewerOverride -EventId 1337)
PARAMETERS
-InputObject
The Object to write.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Level
The Level of the log item being logged. (Default: Informational)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: Informational
Accept pipeline input: False
Accept wildcard characters: False
-Metadata
An optional hashtable of Metadata to include with the log item.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
One or more custom Log Type Names.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Override
An optional array of override options, to override certain properties of log methods. Created using the New-PodeLogEventViewerOverride, etc. functions.
Type: Hashtable[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
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.