New PodeSyslogLoggingMethod - mdaneri/Pode GitHub Wiki
external help file: Pode-help.xml Module Name: Pode online version: PodeType: LoggingMethod schema: 2.0.0
Creates a new Syslog logging method in Pode.
New-PodeSyslogLoggingMethod -Server <String> [-Port <Int16>] [-Transport <String>]
[-TlsProtocol <SslProtocols>] [-SyslogProtocol <String>] [-Encoding <String>] [-SkipCertificateCheck]
[-FailureAction <String>] [-DataFormat <String>] [-AsUTC] [-DefaultTag <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
New-PodeSyslogLoggingMethod -Server <String> [-Port <Int16>] [-Transport <String>]
[-TlsProtocol <SslProtocols>] [-SyslogProtocol <String>] [-Encoding <String>] [-SkipCertificateCheck]
[-FailureAction <String>] [-ISO8601] [-AsUTC] [-DefaultTag <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
This function sets up a logging method that sends log messages to a remote Syslog server. It supports various Syslog protocols (RFC3164, RFC5424), transports (UDP, TCP, TLS), and encoding formats. The function also allows for custom date formatting or ISO 8601 compliance and can skip certificate checks for TLS connections.
$logMethod = New-PodeSyslogLoggingMethod -Server '192.168.1.100' -Transport 'TCP' -SyslogProtocol 'RFC3164'
Creates a new Syslog logging method that sends logs to the Syslog server at 192.168.1.100 using TCP and RFC3164 format.
$logMethod = New-PodeSyslogLoggingMethod -Server '192.168.1.100' -SyslogProtocol 'RFC5424' -ISO8601 -AsUTC
Creates a Syslog logging method that uses RFC5424 format with ISO 8601 date formatting and logs time in UTC.
If set, logs the time 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: False
The custom date format for log entries. Mutually exclusive with ISO8601.
Type: String
Parameter Sets: DataFormat
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The 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: False
The encoding to use for Syslog messages. Supported values are ASCII, BigEndianUnicode, Default, Unicode, UTF32, UTF7, and UTF8. Defaults to UTF8.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: UTF8
Accept pipeline input: False
Accept wildcard characters: False
Specifies the action to take if logging fails. Options are: Ignore, Report, Halt (Default: Ignore).
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Ignore
Accept pipeline input: False
Accept wildcard characters: False
If set, uses the ISO 8601 date format for log entries. Mutually exclusive with DataFormat.
Type: SwitchParameter
Parameter Sets: ISO8601
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
The port on the Syslog server to send logs to. Defaults to 514.
Type: Int16
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 514
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: False
The Syslog server to send logs to. This parameter is mandatory.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If set, skips certificate validation for TLS connections.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
The Syslog protocol to use for message formatting. Supported values are RFC3164 and RFC5424. Defaults to RFC5424.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: RFC5424
Accept pipeline input: False
Accept wildcard characters: False
The TLS protocol version to use if TLS transport is selected. Defaults to TLS 1.3.
Type: SslProtocols
Parameter Sets: (All)
Aliases:
Accepted values: None, Ssl2, Ssl3, Tls, Default, Tls11, Tls12, Tls13
Required: False
Position: Named
Default value: Tls13
Accept pipeline input: False
Accept wildcard characters: False
The transport protocol to use. Supported values are UDP, TCP, and TLS. Defaults to UDP.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: UDP
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.