All Products
Search
Document Center

Realtime Compute for Apache Flink:View historical job logs

Last Updated:Mar 26, 2026

After a Flink job stops or fails, Realtime Compute for Apache Flink gives you three ways to access its logs: the built-in Job Log tab, Object Storage Service (OSS), and Simple Log Service (SLS). This topic describes how to use each method.

Which method to use

Method When to use
Job Log tab Quick inspection — no additional setup required. Archived logs are available for seven days by default.
OSS Long-term storage or large log volumes. Set Log Template to OSS before running the job.
SLS Structured search and analysis across multiple jobs or instances. Set Log Template to SLS before running the job.

Prerequisites

Before you begin, ensure that you have:

  • Log archiving enabled in the log configuration (enabled by default) — required to view logs on the Job Log tab

  • Log output configured to OSS or SLS — required to view logs in OSS or SLS. For setup instructions, see Configure job log output

Usage notes

  • Archived logs are kept for seven days by default. They are retained if a job is stopped, but deleted when the job is deleted.

    After the November 2024 release, all existing job logs in the Realtime Compute for Apache Flink console are deleted when their retention period expires — including archived logs that were retained after a job was stopped.
  • By default, the log configuration keeps two log files at 5 MB each. This limit keeps operational overhead low, but high-volume jobs may roll over logs faster than expected. If 5 MB is not enough for your job's output, export logs to OSS instead.

    The file count does not include the file currently being written. For example, setting the count to 1 results in a maximum of two files: one in memory and one on disk.
  • Logs are written to OSS or SLS only when a Task Manager or the Job Manager starts successfully. If neither starts, no logs are written to OSS or SLS.

  • If you cannot find a log file in OSS because the Job Manager and Task Managers failed to start, contact technical support.

View logs on the Job Log tab

  1. Log on to the Realtime Compute for Apache Flink console.

  2. In the Actions column of the target workspace, click Console.

  3. In the left navigation pane, choose Operation Center > Job O&M.

  4. Click the name of the target job.

  5. Click the Job Log tab.

  6. On the Operational Log tab, click the drop-down list next to Job and select the historical job instance.

    查看历史作业实例日志.jpg

  7. On the Job Manager or Running Task Managers tab, click the name of the log file to view it.

View logs in OSS

  1. Log on to the OSS console.

  2. In the left navigation pane, click Buckets.

  3. Click the Bucket Name that you specified when creating the Flink workspace.

  4. In the Files section, navigate to the target folder. Job logs are stored under logs/${Workspace ID}/${Job ID}/${Instance ID}. The three-level path maps directly to your workspace, job, and instance — go straight to the right folder without scanning the entire bucket. The following table describes all folders in the bucket:

    Folder Description
    artifacts Uploaded JAR packages
    flink-jobs Checkpoints of Flink jobs
    flink-savepoints Savepoint files created when you click Create Snapshot for a job in Operation Center > Job O&M
    logs Job logs when Log Template is set to OSS

View logs in SLS

  1. Log on to the Simple Log Service console.

  2. In the Projects section, click the target project.

  3. On the Logstores tab, click the target Logstore.

  4. Enter a query statement, select a time range, and click Query/Analyze. For query syntax and examples, see Quick start for query and analysis.