日志记录
在插件中请使用logging模块记录日志,不要使用print语句(这将导致容器环境中无法输出日志)。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
This documentation has moved to langbot.app/docs. This legacy site is no longer updated.
logging模块记录日志,不要使用print语句(这将导致容器环境中无法输出日志)。
import logging
logger = logging.getLogger(__name__) # 在任何 Python 文件的开头导入 logging 模块,并定义 logger 对象
logger.info('This is an info message') # 使用 logger.info 记录信息级别日志
logger.warning('This is a warning message')
logger.error('This is an error message')
