Skip to main content

Set-LoggingDefaultFormat

SYNOPSIS

Sets a global logging message format

SYNTAX

Set-LoggingDefaultFormat [[-Format] <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

This function sets a global logging message format

EXAMPLES

EXAMPLE 1

Set-LoggingDefaultFormat -Format '[%{level:-7}] %{message}'

EXAMPLE 2

Set-LoggingDefaultFormat

It sets the default format as [%{timestamp:+%Y-%m-%d %T%Z}] [%{level:-7}] %{message}

PARAMETERS

-Format

The string used to format the message to log

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: $Defaults.Format
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.

INPUTS

OUTPUTS

NOTES

https://logging.readthedocs.io/en/latest/functions/Set-LoggingDefaultFormat.md

https://logging.readthedocs.io/en/latest/functions/LoggingFormat.md

https://logging.readthedocs.io/en/latest/functions/Write-Log.md

https://github.com/EsOsO/Logging/blob/master/Logging/public/Set-LoggingDefaultFormat.ps1

EDIT THIS DOC

This page was auto-generated from the powershell command comment based help. To edit the content of this page, update the script file comment based help on github Github