日志记录功能通过一个简单的封装抽象出来,提供了跨环境一致的日志记录接口。Documentation Index
Fetch the complete documentation index at: https://docs.shipthing.com/llms.txt
Use this file to discover all available pages before exploring further.
工作原理
在开发环境中,日志会输出到控制台以便于调试。在生产环境中,日志会发送到BetterStack Logs,在那里可以搜索、过滤和分析。使用方法
要使用这个日志记录设置,只需导入并使用log对象。它与console对象共享相同的接口,因此你可以在代码库中用log替换console。
page.tsx