apache/beam

[Feature Request]: Add a native Logging transform to Java SDK

Open

#38.528 geöffnet am 18. Mai 2026

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Java (7.313 Stars) (4.097 Forks)batch import
P2good first issuejavanew feature

Beschreibung

What would you like to happen?

AFAIK the Java SDK doesn't have an easy utility to print/log the outputs of a PCollection. I've always had to hack something together like:

    rows.apply(MapElements.into(strings()).via(row -> {
      System.out.println("row: " + row);
      return "";
    }));

Would be nice to have an easy utility that can be used like:

    rows.apply(Log.info());

The Python SDK has something like this: https://github.com/apache/beam/blob/26c6ec7cb749d60455c9895aa1be49d5cf552a75/sdks/python/apache_beam/transforms/util.py#L2183-L2197

Issue Priority

Priority: 2 (default / most feature requests should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Prism Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner

Contributor Guide