Adding more logs (#6)

Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/6
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: hiifong <i@hiif.ong>
Co-committed-by: hiifong <i@hiif.ong>
This commit is contained in:
hiifong
2025-03-25 17:22:39 +00:00
committed by Lunny Xiao
parent 97b98c3fc2
commit 5270d2eb08
9 changed files with 87 additions and 82 deletions

View File

@@ -21,3 +21,8 @@ func TextResult(v any) (*mcp.CallToolResult, error) {
log.Debugf("Text Result: %s", string(resultBytes))
return mcp.NewToolResultText(string(resultBytes)), nil
}
func ErrorResult(err error) (*mcp.CallToolResult, error) {
log.Errorf(err.Error())
return nil, err
}