< Back

Add-LoggingTarget

Sat Jan 18, 2020 9:50 am

NAME Add-LoggingTarget



SYNOPSIS

Enable a logging target





SYNTAX

Add-LoggingTarget [[-Configuration] <Hashtable>] [<CommonParameters>]





DESCRIPTION

This function configure and enable a logging target





PARAMETERS

-Configuration <Hashtable>

An hashtable containing the configurations for the target



Required? false

Position? 3

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:\\>Add-LoggingTarget -Name Console -Configuration @{Level = 'DEBUG'}













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Add-LoggingTarget -Name File -Configuration @{Level = 'INFO'; Path = 'C:\\Temp\\script.log'}















RELATED LINKS

https://logging.readthedocs.io/en/lates ... gTarget.md

https://logging.readthedocs.io/en/lates ... ite-Log.md

https://logging.readthedocs.io/en/lates ... Targets.md

https://github.com/EsOsO/Logging/blob/m ... Target.ps1