# rpk transform logs

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: rpk transform logs
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: rpk/rpk-transform/rpk-transform-logs
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: rpk/rpk-transform/rpk-transform-logs.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/rpk/rpk-transform/rpk-transform-logs.adoc
page-git-created-date: "2024-07-25"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/rpk/rpk-transform/rpk-transform-logs.md -->

View logs for a transform.

Data transform’s STDOUT and STDERR are captured during runtime and written to an internally managed topic `_redpanda.transform_logs`.

This command outputs logs for a single transform over a period of time and printing them to STDOUT. The logs can be printed in various formats.

By default, only logs that have been emitted are displayed. Use the `--follow` flag to stream new logs continuously.

## [](#filtering)Filtering

The `--head` and `--tail` flags are mutually exclusive and limit the number of log entries from the beginning or end of the range, respectively.

The `--since` and `--until` flags define a time range. Use one or both flags to limit the log output to a desired period of time.

Both flags accept values in the following formats:

| Value | Description |
| --- | --- |
| now | the current time, useful for --since=now |
| 13 digits | parsed as a Unix millisecond |
| 9 digits | parsed as a Unix second |
| YYYY-MM-DD | parsed as a day, UTC |
| YYYY-MM-DDTHH:MM:SSZ | parsed as RFC3339, UTC; fractional seconds optional (.MMM) |
| -dur | a negative duration from now |
| dur | a positive duration from now |

Durations are parsed simply:

| Value | Description |
| --- | --- |
| 3ms | three milliseconds |
| 10s | ten seconds |
| 9m | nine minutes |
| 1h | one hour |
| 1m3ms | one minute and three milliseconds |

## [](#formatting)Formatting

Logs can be displayed in a variety of formats using `--format`.

The default `--format=text` prints the log record’s body line by line.

When `--format=wide` is specified, the output includes a prefix that is the date of the log line and a level for the record. The INFO level corresponds to being emitted on the transform’s STDOUT, while the WARN level is used for STDERR.

The `--format=json` flag emits logs in the JSON encoded version of the Open Telemetry LogRecord protocol buffer.

## [](#examples)Examples

Reads logs within the last hour:

```bash
rpk transform logs --since=-1h
```

Reads logs prior to 30 minutes ago:

```bash
rpk transform logs --until=-30m
```

The following command reads logs between noon and 1pm on March 12th:

```bash
rpk transform logs my-transform --since=2024-03-12T12:00:00Z --until=2024-03-12T13:00:00Z
```

## [](#usage)Usage

```bash
rpk transform logs NAME [flags]
```

## [](#aliases)Aliases

```bash
logs, log
```

## [](#flags)Flags

| Value | Type | Description |
| --- | --- | --- |
| -f, --follow | - | Specify if the logs should be streamed. |
| --format | string | Output format (json,yaml,text,wide,help) (default "text"). |
| --head | int | The number of log entries to fetch from the start. |
| -h, --help | - | Help for logs. |
| --since | timestamp | Start reading logs after this time (now, -10m, 2024-02-10). See Filtering for format details. |
| --tail | int | The number of log entries to fetch from the end. |
| --until | timestamp | Read logs up unto this time (-1h, 2024-02-10T13:00:00Z). See Filtering for format details. |
| --config | string | Redpanda or rpk config file; default search paths are /var/lib/redpanda/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml. |
| -X, --config-opt | stringArray | Override rpk configuration settings; '-X help' for detail or '-X list' for terser detail. |
| --profile | string | rpk profile to use. |
| -v, --verbose | - | Enable verbose logging. |