< Back
Add-PodeLogger
Post
NAME Add-PodeLogger
SYNOPSIS
Adds a custom Logging method for parsing custom log items.
SYNTAX
Add-PodeLogger [-Name] <String> [-Method] <Hashtable> [-ScriptBlock] <ScriptBlock> [[-ArgumentList] <Object[]>]
[<CommonParameters>]
DESCRIPTION
Adds a custom Logging method for parsing custom log items.
PARAMETERS
-Name <String>
A unique Name for the Logging method.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Method <Hashtable>
The Method to use for output the log entry (From New-PodeLoggingMethod).
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-ScriptBlock <ScriptBlock>
The ScriptBlock defining logic that transforms an item, and returns it for outputting.
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ArgumentList <Object[]>
An array of arguments to supply to the Custom Logger's ScriptBlock.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>New-PodeLoggingMethod -Terminal | Add-PodeLogger -Name 'Main' -ScriptBlock { /* logic */ }
RELATED LINKS
SYNOPSIS
Adds a custom Logging method for parsing custom log items.
SYNTAX
Add-PodeLogger [-Name] <String> [-Method] <Hashtable> [-ScriptBlock] <ScriptBlock> [[-ArgumentList] <Object[]>]
[<CommonParameters>]
DESCRIPTION
Adds a custom Logging method for parsing custom log items.
PARAMETERS
-Name <String>
A unique Name for the Logging method.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Method <Hashtable>
The Method to use for output the log entry (From New-PodeLoggingMethod).
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-ScriptBlock <ScriptBlock>
The ScriptBlock defining logic that transforms an item, and returns it for outputting.
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ArgumentList <Object[]>
An array of arguments to supply to the Custom Logger's ScriptBlock.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>New-PodeLoggingMethod -Terminal | Add-PodeLogger -Name 'Main' -ScriptBlock { /* logic */ }
RELATED LINKS