---
source_url: https://www.pubnub.com/docs/message-processing/serverless/export-logs
title: Export Functions logs
updated_at: 2026-09-30T07:20:08.000Z
---

# Export Functions logs

## Documentation index

To discover more PubNub resources:

1. Fetch [PubNub's llms.txt](https://www.pubnub.com/llms-full.txt) for a list of available pages in Markdown format.
2. Identify relevant URLs from that index.
3. Fetch the target pages.

Do not assume a path exists, always check the index first.

Functions publish log output to an internal PubNub channel. To keep that output after the console session ends, use [Events & Actions](https://www.pubnub.com/docs/integrations/event-forwarding/overview.md) to forward it to a Webhook endpoint or an S3 bucket.

## Before you start

Before starting, confirm you have:

* A deployed Function. If you do not have one, see [Create a Function](https://www.pubnub.com/docs/message-processing/serverless/create-function.md).
* The log channel name for your Function revision. It follows the pattern `output-rev-{{functionRevisionId}}-key-{{keysetId}}`, for example `output-rev-NSPiAuYKsWSxJl4yBn30-key-abc123`. Find the exact name in the Console output.

A Function replica publishes up to 250 console log lines over its lifetime, not per execution, and output stops silently once a replica reaches that budget.

## Configure the event listener

1. In the Admin Portal, open [Events & Actions](https://admin.pubnub.com) and [configure an event listener](https://www.pubnub.com/docs/integrations/event-forwarding/configure.md) on the log channel.
2. Enter the `output-rev-*` channel name from the Console output in the **Condition value** field.

   ![Event listener configured on the Functions log channel](https://www.pubnub.com/assets/images/event-listener-logs-da5def629104b11177bce64617dedc55.png)

## Create the export action

1. Create a [Webhook](https://www.pubnub.com/docs/integrations/event-forwarding/create-webhook-action.md) or [S3](https://www.pubnub.com/docs/integrations/event-forwarding/create-s3-action.md) action.
2. Attach the event listener you created in the previous section to the action.
3. To send multiple log events in one request, enable batching on the action.

Events & Actions now forwards log output to your destination each time the Function publishes to the log channel.

Last updated at: 2026-09-30T07:20:08.000Z
