Includes the current working directory changes. Historical commits and release binaries are excluded to limit Gitea storage. Source base: d7515973fbfd6dd2001fa156c483455b8081c7cb
25 lines
778 B
Go
25 lines
778 B
Go
package bridge
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"cursor/internal/logger"
|
|
)
|
|
|
|
var errServiceNotReady = errors.New("应用未初始化")
|
|
|
|
// logServiceCall 记录用户触发或后台调用的服务操作,不记录密钥和配置正文。
|
|
func logServiceCall(service string, operation string, attrs ...any) {
|
|
args := append([]any{"service", service, "operation", operation}, attrs...)
|
|
logger.Info("service call", args...)
|
|
}
|
|
|
|
// logServiceResult 统一记录服务操作结果,失败时保留原始错误。
|
|
func logServiceResult(service string, operation string, err error) {
|
|
if err != nil {
|
|
logger.Error("service call failed", "service", service, "operation", operation, "error", err)
|
|
return
|
|
}
|
|
logger.Info("service call completed", "service", service, "operation", operation)
|
|
}
|