---
schema_version: "1"
id: b35f5476680c9c14f60358a80e4a875b9ffe009537f4b98352f171086850c76c
title: SSE Logging Policy
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/1.12/policies-included-sse-logging.md
canonical_url: https://docs.mulesoft.com/gateway/1.12/policies-included-sse-logging
source_site: docs.mulesoft.com
content_type: documentation
content_hash: caf38cc15a96cbfa1a356957a5bb2303814a7f2b0a8f259c5e3d35e5b6567219
description: MuleSoft Documentation Site
release: "1.12"
latest: false
---
# SSE Logging Policy

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<tbody>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>Policy Name</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">SSE Logging</p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>Summary</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Logs every SSE event while streaming</p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>Category</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">SSE</p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>First Flex Gateway version available</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">v1.9.3</p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>Returned Status Codes</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">No return codes exist for this policy.</p></td>
</tr>
</tbody>
</table>

## [](#summary)Summary

The SSE Logging policy enables logging for SSE connections. The configured SSE logs appear in Flex Gateway logs.

<table><tbody><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content">This policy only provides logs for SSE events. To log non-SSE information, see <a href="https://docs.mulesoft.com/gateway/1.12/policies-included-message-logging" class="xref page">Message Logging Policy</a>.</td></tr></tbody></table>

## [](#configuring-policy-parameters)Configuring Policy Parameters

### [](#flex-gateway-local-mode)Flex Gateway Local Mode

The SSE Logging policy isn’t supported in Local Mode.

### [](#connected-mode)Managed Flex Gateway and Flex Gateway Connected Mode

When you apply the policy from the UI, the following parameters are displayed:

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Element</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Logs</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>List of logs executed on every SSE event.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>DataWeave expression for SSE response messages</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>DataWeave Expression that extracts information from the SSE Event. Use <code><mark>[payload]</mark></code> for the event’s payload, <code>[vars.data]</code> for the event data, and <code>#[vars.id]</code> for the event ID.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Category</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>String prefix to add to each log message.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Level</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Defines the level of message to log: <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, or <code>DEBUG</code>.<br>
For more information, see <a href="#severity-levels">Message Logging Severity Levels</a>.</p>
</div></div></td>
</tr>
</tbody>
</table>

## [](#severity-levels)Message Logging Severity Levels

When you configure a Message Logging policy for your API instance, you can assign a severity level. Each severity level includes a specific set of information in the log report.

Log reports include the severity level you select and the following levels on the hierarchy.

For example, if you select DEBUG, the log reports include the DEBUG severity level as well as the INFO, WARN, and ERROR severity levels. However, if you select ERROR, the log reports include only error messages. The following table describes the type of information included in the logs for each severity level:

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 16.6666%;">
<col style="width: 83.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Log Severity Level</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>DEBUG</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Tracing information used by application developers.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>INFO</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Informational messages that highlight the progress of the application.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>WARN</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Potentially harmful situations that indicate potential problems.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>ERROR</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Events that prevent normal program execution but might allow the application to continue running.</p>
</div></div></td>
</tr>
</tbody>
</table>