New PodeTerminalLoggingMethod - mdaneri/Pode GitHub Wiki
external help file: Pode-help.xml Module Name: Pode online version: PodeType: LoggingMethod schema: 2.0.0
Creates a new terminal logging method in Pode.
New-PodeTerminalLoggingMethod [-DataFormat <String>] [-AsUTC] [-DefaultTag <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
New-PodeTerminalLoggingMethod [-ISO8601] [-AsUTC] [-DefaultTag <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
This function sets up a logging method that outputs log messages to the terminal using Pode's internal terminal logging logic. It allows specifying a custom date format, or uses the ISO 8601 format if requested. Additionally, it supports logging time in UTC.
$logMethod = New-PodeTerminalLoggingMethod -DataFormat 'yyyy/MM/dd HH:mm:ss'
Creates a terminal logging method using the specified custom date format.
$logMethod = New-PodeTerminalLoggingMethod -ISO8601 -AsUTC
Creates a terminal logging method that logs messages using the ISO 8601 date format and logs the time in UTC.
If set, the time will be logged in UTC instead of local time.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseThe custom date format to use for log entries. If not provided, a default format of 'dd/MMM/yyyy:HH:mm:ss zzz' is used. This parameter is mutually exclusive with the ISO8601 parameter.
Type: String
Parameter Sets: DataFormat
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe tag to use if none is specified on the log entry. Defaults to '-'.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: -
Accept pipeline input: False
Accept wildcard characters: FalseIf set, the date format will follow ISO 8601 (equivalent to -DataFormat 'yyyy-MM-ddTHH:mm:ssK'). This parameter is mutually exclusive with the DataFormat parameter.
Type: SwitchParameter
Parameter Sets: ISO8601
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.