How can I group multiple logs together?

I have multiple logs coming used the automatic instrumentation for that, now I want to show show the logs as records using any visualization(be it tables or just simple ttext), I want the logs to group together until some next logs’s body or something indicates that new record started. Is it possible through any method?