logging

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 4 Imported by: 0

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 Debug

func Debug(msg string, kv ...any)

Debug 输出 debug 级别日志。

func Error

func Error(msg string, kv ...any)

Error 输出 error 级别日志。

func ErrorPersist

func ErrorPersist(msg string, kv ...any)

ErrorPersist 输出 error 级别日志(LSP 中表示「必须留痕」的错误)。

func RecoverPanic

func RecoverPanic(name string, handler func())

RecoverPanic 用于 defer:捕获 panic,记录堆栈后执行 handler。

func Warn

func Warn(msg string, kv ...any)

Warn 输出 warn 级别日志。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL