< Back

Set-LoggingCallerScope

Sat Jan 18, 2020 9:51 am

NAME Set-LoggingCallerScope



SYNOPSIS

Sets the scope from which to get the caller scope





SYNTAX

Set-LoggingCallerScope [[-CallerScope] <Int32>] [<CommonParameters>]





DESCRIPTION

This function sets the scope to obtain information from the caller





PARAMETERS

-CallerScope <Int32>

Integer representing the scope to use to find the caller information. Defaults to 1 which represent the scope

of the function where Write-Log is being called from



Required? false

Position? 1

Default value $Defaults.CallerScope

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:\\>Set-LoggingCallerScope -CallerScope 2













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



PS C:\\>Set-LoggingCallerScope



It sets the caller scope to 1











RELATED LINKS

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

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

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