Log management

更新时间:
复制 MD 格式

SAE provides two types of logs for Job templates: real-time logs for quick diagnostics and persistent logs stored in Simple Log Service (SLS) for long-term retention and analysis. Real-time logs are capped at 500 entries. If you need keyword search, aggregation, or history beyond 500 entries, set up SLS log collection instead.

Prerequisites

Before you begin, ensure that you have:

Log types

TypeWhat it capturesFilters supportedLimit
Real-time logStandard output (stdout) from podsPod selection, refresh rate500 most recent entries
Persistent logstdout and business file logs from containers, shipped to SLSKeyword search, aggregation, time rangeUnlimited

View real-time logs

  1. Go to the SAE Job Templates page. Select a region and namespace, then click the target Job template.

  2. In the navigation pane, click Log Management > Real-time Log.

  3. On the Real-time Log page, select a pod from the POD Name drop-down list and set a refresh interval from the Real-time Log Refresh Rate drop-down list.

Real-time logs support two filters: pod selection and refresh rate. For keyword search, aggregation, or queries beyond 500 entries, use persistent logs in SLS instead.

SAE displays the 500 most recent log entries. To view older entries, set up log collection in SLS.

Set up log collection in SLS

  1. Go to the SAE Job Templates page. Select a region and namespace, then click the target Job template.

  2. On the Job Template Details page, click Edit Job Template.

  3. Expand Log Configuration and turn on SLS Log Service.

After you enable SLS log collection, SAE automatically routes container stdout and business file logs to your SLS Logstore whenever you create or deploy a task. In SLS, you can query unlimited log entries, run aggregations, and search by keyword — capabilities not available in real-time logs.

For full configuration options, see Set up log collection in SLS.