Skip to content

New-PodeLogNetworkMethod

SYNOPSIS

Creates a new network Log Method.

SYNTAX

New-PodeLogNetworkMethod [[-Id] <String>] [-Server] <String> [[-Transport] <String>] [[-Port] <Int32>]
 [[-BatchInfo] <Hashtable>] [-SkipCertificateCheck] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Creates a new network Log Method for outputting log items to a remote server over UDP, TCP, or TLS.

EXAMPLES

EXAMPLE 1

$methodId = New-PodeLogNetworkMethod -Server '192.168.1.100' -Transport 'Tcp' -Port 514

EXAMPLE 2

$methodId = New-PodeLogNetworkMethod -Server 'logs.example.com' -Transport 'Tls' -Port 6514 -SkipCertificateCheck

EXAMPLE 3

$batchInfo = New-PodeLogBatchInfo -Size 10 -Timeout 10
$methodId = New-PodeLogNetworkMethod -Server 'logs.example.com' -Transport 'Udp' -BatchInfo $batchInfo

PARAMETERS

-BatchInfo

An optional hashtable containing batch configuration for writing log items in bulk. Should be created using New-PodeLogBatchInfo.

Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id

An optional ID to assign to the Log Method. If not supplied, a random ID will be generated.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port

The port number to use. (Default: 514)

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: 514
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

-Server

The address (IP or Hostname) of the remote server to send log items to.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipCertificateCheck

A switch parameter to skip certificate validation when using TLS transport.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Transport

The transport protocol to use for sending log items. (Default: 'Udp')

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: Udp
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.

INPUTS

OUTPUTS

System.String

NOTES