gctoolkit icon indicating copy to clipboard operation
gctoolkit copied to clipboard

Add source information to events (source file, line number)

Open jlittle-ptc opened this issue 5 months ago • 2 comments

Is your feature request related to a problem? Please describe. Our application can identify areas of concern in a log file, and having the ability to direct the user to the specific line(s) in the source file where the problem occurs would improve the user experience.

Describe the solution you'd like At a minimum the starting line number added to the GCEvent. Adding an end line is optional, but might be useful.

We currently only use the SingleGCLogFile source in our application, but those using the RotatingGCLogFile may want to have the source filename/path available as well.

jlittle-ptc avatar Jul 09 '25 13:07 jlittle-ptc

The complicating factor here is that an event can span multiple, not necessarily contiguous, lines. I think a way to handle this would be to collect the line numbers and lines in the forward reference.

dsgrieve avatar Jul 10 '25 13:07 dsgrieve

Good point. For Unified logging, it's not as big of a deal as each line has an event ID attached, though that's also the only place I've noticed event interleaving. Our specific use case will do fine with start-only, anything above is bonus.

jlittle-ptc avatar Jul 10 '25 13:07 jlittle-ptc