rugged icon indicating copy to clipboard operation
rugged copied to clipboard

git_trace_set in Rugged

Open Chocrates opened this issue 2 years ago • 4 comments

It doesn't look like git_trace_set is implemented for Rugged. Is that true? If not how does one activate tracing when using Rugged?

Chocrates avatar Feb 08 '22 23:02 Chocrates

It's true. You cannot enable tracing from rugged. One would first have to add that feature and link against a libgit2 with tracing enabled.

carlosmn avatar Feb 09 '22 07:02 carlosmn

Do you know if we have any documentation I could follow to add the methods? @carlosmn

Chocrates avatar Feb 09 '22 16:02 Chocrates

One warning here is that libgit2 - generally speaking, at least - does not really emit any useful tracing for you to catch. If you're running into problems that you need to surface into your logging system, and you're going to go instrument libgit2 to catch some error, that's great. (That's what we added the logging functionality for.)

If you're going to add a bunch of trace statements in libgit2, then it makes sense to do this work.

I just wanted to mention that in case you were planning on wiring up tracing in rugged itself, and then were disappointed when you didn't see anything. 😁

(Actually, I think some of the http code sends tracing because it helped implement it.)

ethomson avatar Feb 09 '22 17:02 ethomson

Ah thank you @ethomson maybe I will hold off then. I am trying to debug intermittent clone errors with Rugged, was hoping for GIT_TRACE and GIT_TRACE_PACKET type of data.

Chocrates avatar Feb 09 '22 18:02 Chocrates