Set LogConfiguration - PPOSHGROUP/PPoShTools GitHub Wiki
PPoShTools -> Set-LogConfiguration.ps1
Sets global logging configuation (used by Write-Log).
Set-LogConfiguration [[-LogLevel] <String>] [[-LogFile] <String>]
[-LogEventLogSource] [-LogEventLogThreshold] [<CommonParameters>]
It sets $LogConfiguration object which describes logging configuration (see LogConfiguration.ps1).
Logging level threshold. Only messages with this level or above will be logged (default: Info).
- Valid values: <empty>, Debug, Info, Warn, Error
- PipelineInput: false
- Required: false
Path to additional file log or $null if shouldn't log to file (default: $null).
- PipelineInput: false
- Required: false
Name of Event Log Source to log to or $null if shouldn't log to Event Log (default: $null).
- DefaultValue: False
- PipelineInput: false
- Required: false
Logging level threshold for Event Log. This would normally have higher threshold than LogLevel (default: Error).
- Valid values: <empty>, Debug, Info, Warn, Error
- DefaultValue: False
- PipelineInput: false
- Required: false
Set-LogConfiguration -LogLevel 'Warn' -LogFile "$PSScriptRoot\test.log"