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

    function createFileSink(filePath: string, opts?: FileSinkOptions): FileSink;

    Defined in: logs/sink.ts:64

    创建文件追加 sink(纯文本、同步写入)。

    Parameters

    ParameterType
    filePathstring
    optsFileSinkOptions

    Returns

    FileSink