dlt-daemon icon indicating copy to clipboard operation
dlt-daemon copied to clipboard

add functionality to dump ring buffer to disk file

Open jianjun-huang opened this issue 2 years ago • 4 comments

For example: /usr/bin/dlt-logstorage-ctrl -D /tmp/ss.dlt

will dump the entries in ringbuffer to file /tmp/ss.dlt

jianjun-huang avatar Dec 04 '23 17:12 jianjun-huang

Hello @jianjun-huang thanks for your contribution, this looks interesting feature for dlt. Dumping logs from ring buffer to files would be very useful in case no daemon available and we need to rotate the buffer for new logs. This prevents missing all the old logs. I will review and test on my local. Regards

minminlittleshrimp avatar Dec 05 '23 07:12 minminlittleshrimp

Hello @jianjun-huang I read through the code change and it seems the same functionality of our current implementation of Sync Behavior ON_DEMAND: When activate this sync option, we just need to send a sync signal for dumping logs from cache (logstorage ring buffer) to dlt files. Could you kindly clarify my point? In this case, we will reconsider to not approve for this PR. Regards

minminlittleshrimp avatar Jan 03 '24 08:01 minminlittleshrimp

Hi @minminlittleshrimp this option is similar to ON_DEMAND, but this option does not remove logs from ringbuffer, just peek dlt messages from the ringbuffer.

jianjun-huang avatar Jan 03 '24 14:01 jianjun-huang

I see, I need to check in my local. So sorry for the late response, we are busy these days releasing internal dlt.

minminlittleshrimp avatar Jan 03 '24 16:01 minminlittleshrimp