Documentation
¶
Overview ¶
Package logging 是 opencode internal/logging 的最小替代。
迁移过来的 opencode 代码(lsp 包、tool/coder 工具)只用到 Debug / Warn / Error / ErrorPersist / RecoverPanic,这里把它们桥接到 gobrave 的 logrus logger,避免为迁移代码再引入一套日志设施。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorPersist ¶
ErrorPersist 输出 error 级别日志(LSP 中表示「必须留痕」的错误)。
func RecoverPanic ¶
func RecoverPanic(name string, handler func())
RecoverPanic 用于 defer:捕获 panic,记录堆栈后执行 handler。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.