---
sourceDocument: Australia Workflow Data Fabric
sourceDocumentLink: https://www.servicenow.com/docs/r/australia/integrate-applications

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Workflow Data Fabric

ft:clusterId :

    - crint

bundleId :

    - crint

workflow :

    - Creator


---

# Configure logging

# Configure logging for the PowerShell step {#ariaid-title1}

Release version: Australia  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read  
Add log messages to the scripts in your PowerShell step. Use log levels for improved
logging and debugging.

## Before you begin

To add log messages to your script, you will need to use the
Write-SNCLog function. This function is defined in the
IH\\Logging.psm1 module. Use PSScript.ps1 to import this module so inline scripts
have access to Write-SNCLog. For more information, see [MID Server PowerShell
files](https://www.servicenow.com/docs/access?context=mid-server-powershell-files&version=australia&pubname=australia-servicenow-platform&ft:locale=en-US).

Role required: admin

## Procedure

1. Navigate to AllMID ServerProperties.
2. Set mid.property.powershell.log_info to true.  
   This property enables or disables logging. For more information, see [PowerShell log property](https://www.servicenow.com/docs/access?context=powershell-log-property&version=australia&pubname=australia-servicenow-platform&ft:locale=en-US).
3. Set mid.property.powershell.ih.log_level to the desired log level.  
   The log level specifies the threshold required to log a message. Messages are logged at the specified level or higher. For example, if this property is set to WARN, then messages with a level of WARN or ERROR are logged. Messages with a level of INFO, DEBUG, or TRACE are not logged. The levels, listed from low to high, are:
   * TRACE
   * DEBUG
   * INFO
   * WARN
   * ERROR
   {#configure-logging-powershell-step__ul_d53_2b1_jtb}The default value is INFO.
4. **Optional:** Configure a system property so that you can view the logs in the instance.
   1. Navigate to AllProcess AutomationFlow DesignerProperties.
   2. Find Specify the log level of system log entries to replicate to the flow log. The system only replicates log entries of the specified level or higher and set it to INFO or DEBUG.

   {#configure-logging-powershell-step__substeps_imq_42q_jyb}  
   After the you build and execute the PowerShell script, the logs are available in the MID agent log. Configuring this property also enables you to view them directly in the instance.

   This step sets the com.glide.hub.flow_engine.listener_trace.threshold property. It replicates the logs to the Flow engine log entries \[sys_flow_log\] table.
5. In your PowerShell script, add log messages and levels with the Write-SNCLog function.  
   {#configure-logging-powershell-step__table_pxf_3lj_dtb__entry__2}

   | Name | Description |
   |-|-|
   | Write-SNCLog function | Log a message for the PowerShell step. Write-SNCLog has two parameters, -Level and -Message. Both parameters are required, but the parameter names are not. If the names are omitted, the position is used to determine the level and message. Examples: * `Write-SNCLog -Level WARN -Message "log warning"` * `Write-SNCLog WARN "log warning"` {#configure-logging-powershell-step__ul_cn4_jnj_dtb}Both of these examples log `WARN: log warning`. |
   | -Level parameter | Specify the level for the log message. Valid values are: * ERROR * WARN * INFO * DEBUG * TRACE {#configure-logging-powershell-step__ul_vpj_wns_gtb}This parameter is required. |
   | -Message parameter | Specify the message to log. Entered as a string. This parameter is required. |
   [Table 1. Write-SNCLog function and parameters]

   {#configure-logging-powershell-step__table_pxf_3lj_dtb}
6. Continue building your action or flow, then test and run it.

## What to do next

The new logs are available in the MID agent log and can be downloaded from the MID
Server. For more information, see [Download the MID Server
files](https://www.servicenow.com/docs/access?context=t_DownloadMIDServerFiles&version=australia&pubname=australia-servicenow-platform&ft:locale=en-US).

If you set the system property to view the logs in the instance, you can see them in
the Flow engine log entries tab of the Flow engine context
record. For more information, see Flow execution details.
**Related tasks**   

* [Test a credential for the PowerShell step](https://www.servicenow.com/docs/tyLJkjnbnk~jxFDo~O40jw "Test a configured credential in the PowerShell step. Confirm the credential is working before building the rest of your step.")

*[\>]: and then


