How to write Telemtry log(.tlog) in QGC?

Hi, everyone.

I’m anaylizing how to write tlog in QGC. I want to replay log with tlog that is gerated by QGC. I know that QGC saves tlogs easily, but I want to save only the parts I want as tlogs. Can you tell me which part of the QGC source code is writing the tlog? code has a saveTelemtryLog function but does not know how it is used.