For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/sdk/logs/functions/parseBdsEmbeddedLevel.md.
  • 简体中文
  • Function: parseBdsEmbeddedLevel()

    function parseBdsEmbeddedLevel(line: string): LogLevel | null;

    Defined in: logs/format.ts:63

    从单行文本中提取 BDS 内嵌的日志级别(优先提取行首前缀,未命中时在全文中查找首次出现的标记)。 例如:[2026-07-25 18:42:27:626 warn] [Commands] ... → "warn"。

    Parameters

    ParameterTypeDescription
    linestring日志文本行。

    Returns

    LogLevel | null

    提取到的级别枚举,未找到时返回 null。