> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# console: log() method

APISummary
`log` 方法用于在控制台面板输出信息，日志级别为 log 级别。

## 语法

```ts
log(val1, val2, ...): undefined;
```

### 参数

#### val1, val2, ...

输出的 JavaScript 值列表。这些值中的每个值的表示形式都以给定的顺序输出。

### 返回值

无（`undefined`）。

## 兼容性

**Compatibility Table**

**Query:** `lynx-api.global.console.log`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-api/global/console/log.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| log | Yes (1.3) | Yes (3.4) | Yes (1.3) | Yes (3.5) | Yes (3.5) | Yes |

**`log`**

output a log level message

