PowerShell Log Writer

Overview

The PowerShell logger can be used to perform a custom action for log entries using PowerShell script.

Considerations

Use of this logger is encouraged in conjunction with a log filter in order to reduce the number of log entries that are sent to the script, as UNIFYNow can create a lot of logging information.

Configuration

The PowerShell writer requires the following by way of configuration:

Attribute Description
Name The display name of the log writer which is used for identification throughout UNIFYNow.
Begin Script The script to execute when the log writer is created.
Log Script The script to execute to log. The log entry can be accessed using the $logEntry object.
End Script The script to execute when the log writer is disposed.

$logEntry

Property Description
Timestamp (DateTime) - The timestamp of the logged item.
LogEntryModule (String) - The module or component from which the log item was risen.
LogEntrySeverity [Information|Warning|Error] - The severity of the log item.
LogEntryMessage (String) - The message of the log item.
LogEntryLevel [Diagnostic|Verbose|Normal|Minimal] - The level of the log item.
LogEntryData (Dictionary {string, object}) - The data for the logged item.

This article was helpful for 1 person. Is this article helpful for you?