PowerShell Connector Logger
Overview
The logger is a version of the internal UNIFYBroker logging mechanism, that has been made available to the PowerShell connector.
Implementation
Inside any of the PowerShell scripts, access has been allowed to the UNIFYBroker logging mechanism $logger
which can be used to log to the configured UNIFYBroker logs.
For example:
$logger.LogError("Communication with web service failed.");
Methods
LogInformation
Logs the information message all attached log writers.
Parameter name | Type | Description |
---|---|---|
message | string | Message to be logged. |
level | LoggingLevel (optional) | The logging level to log this message at. |
LogWarning
Logs a warning message to all attached log writers.
Parameter name | Type | Description |
---|---|---|
message | string | Message to be logged. |
level | LoggingLevel (optional) | The logging level to log this message at. |
LogError
Logs an error message to all attached log writers.
Parameter name | Type | Description |
---|---|---|
message | string | Message to be logged. |
level | LoggingLevel (optional) | The logging level to log this message at. |
Log
Logs a message to all attached log writers.
Parameter name | Type | Description |
---|---|---|
message | string | Message to be logged. |
severity | SeverityType | Severity of the log message. |
level | LoggingLevel | The logging level to log this message at. |
LogException
Logs an exception to all attached log writers.
Parameter name | Type | Description |
---|---|---|
exception | Exception | The exception to be logged. |
severity | SeverityType | Severity of the log message. |
level | LoggingLevel (optional) | The logging level to log this message at. |
Other details
LoggingLevel
If the logging level is overridden in the PowerShell script, select one that appropriate for the type of information that is logged. Do not use the logging level to turn logging on or off, this is the role of the logging configuration.
Level | Name | Description |
---|---|---|
1 | Diagnostic | This level is for purely diagnostic information. |
2 | Verbose | This level is verbose information, which would normally not be logged. |
3 | Normal | The level is the normal logging level. |
4 | Minimal | This level is the minimal logging level. |
SeverityType
Level | Name | Description |
---|---|---|
1 | Information | Indicates the log entry item is purely for information and does not necessarily pertain to a state of error. |
2 | Warning | Indicates the log entry pertains to a state of warning that may or may not represent a state of error. |
3 | Error | Indicates a log entry pertaining to a state of error. |
Customer support service by UserEcho