For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
预约演示登录免费开始
  • 使用 SDK
    • SDK 概述
    • SDK 如何工作
    • Quickstart
    • Customer showcase
  • 使用 SDK
    • 项目结构
    • 添加自定义代码
    • Migrating to Replay
    • 功能特性
  • 参考
      • Generating an SDK
      • 发布到 PyPI
      • Python 配置
      • 添加自定义代码
      • 动态身份验证
      • aiohttp 支持
      • 变更日志
      • Customer showcase
  • 资源
    • generators.yml
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
预约演示登录免费开始
参考Python

Changelog

February 10, 2026
February 10, 2026
此页面是否有帮助?
编辑此页面
上一个

February 11, 2026

下一个

February 9, 2026

4.58.0

(feat): 为生成的 SDK 添加日志记录支持。 用户可以通过向客户端构造函数传递 logging 参数来配置日志记录器。

1from acme import AcmeClient
2from acme.core import ConsoleLogger
3
4client = AcmeClient(
5 token="YOUR_TOKEN",
6 logging={
7 "level": "debug", # "info" 是默认值
8 "logger": ConsoleLogger(), # ConsoleLogger 是默认值
9 "silent": False, # True 是默认值,设置为 False 以启用日志记录
10 }
11)

logging 参数接受一个包含以下属性的 LogConfig 字典:

  • level:要使用的日志级别。默认为 "info"。
  • logger:要使用的日志记录器。默认为 ConsoleLogger。
  • silent:是否静默日志记录器。默认为 True。

level 属性可以是以下值之一:

  • "debug"
  • "info"
  • "warn"
  • "error"

要提供自定义日志记录器,请传递一个实现 ILogger 协议的对象,该对象具有 debug、info、warn 和 error 方法。

敏感头部信息(authorization、x-api-key、cookie 等)会在日志中自动被编辑。