Write-Log
Write-Log
The Write-Log function is main tool to actually write/send each log message. One the targets are configured, Write-Log will queue the log message to be written to all configured targets as long as the minimum Level is reached.
Write-Log accepts the following parameters
-Levelparameter to define that logs level.-Messageparameter defines the actual message to log.-Argumentsparameter allows you to use format placeholders in the message like, -Message 'Hello, 0' -Arguments $Username-Bodyparameter allows you pass additional info the target. Please see the target specific documentation for more information.-ExceptionInfoparameter allows you to pass an Exception object to the target. Targets might process these objects differently.