rpk transform logs
View logs for a data transform. Streams STDOUT and STDERR output captured during runtime to your terminal.
Usage
rpk transform logs NAME [flags]
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 of both flags to
limit the log output to a desired period of time.
Both flags accept values in the following formats:
| Value | Description |
|---|---|
|
the current time, useful for |
|
parsed as a Unix millisecond |
|
parsed as a Unix second |
|
parsed as a day, UTC |
|
parsed as RFC3339, UTC; fractional seconds optional (.MMM) |
|
a negative duration from now |
|
a positive duration from now |
Durations are parsed simply:
| Value | Description |
|---|---|
|
three milliseconds |
|
ten seconds |
|
nine minutes |
|
one hour |
|
one minute and three milliseconds |
For example,
--since=-1h reads logs within the last hour \
--until=-30m reads logs prior to 30 minutes ago
The following command reads logs between noon and 1pm on March 12th:
rpk transform logs my-transform --since=2024-03-12T12:00:00Z --until=2024-03-12T13:00:00Z
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.
Flags
| Value | Type | Description |
|---|---|---|
|
bool |
Specify if the logs should be streamed. |
|
string |
Output format ( |
|
int |
The number of log entries to fetch from the start. |
|
timequery |
Start reading logs after this time ( |
|
int |
The number of log entries to fetch from the end. |
|
timequery |
Read logs up unto this time (-1h, 2024-02-10T13:00:00Z). |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |