How to record data logs in full resolution for unlimited period of time?

hey, I know this topic is already closed, but I ran to another issue and I think this might be the right thread to clear the confusion.
I am trying to save the data at 10 kHz sampling rate. For that, I think I should change the device sampling frequency. And then save the sampled data without any downsampling. I cannot use the statisstics_callback method. I need to use stream_process_register method. If I want to save this file not in JLS but in a csv file, I cannot use DataRecorder Module. How do I go on about it? Should I define a new DataRecorder Class? If so where do I start.
Or is there a way to convert jls file into csv file? That would work too.
Edit: Let us suppose I want the data captured at 10 kHz Rate to be saved continously in csv till CTRL +C is pressed. what is the right way to do it? If i understand correctly the example file readbycallback.py only captures for specified amout of time. But I want to be able to capture till CTRL+C is pressed. And is my understanding correct that using samples_get method you can only get current, voltage and power value? Since Energy is calcuated, I need to get it from statistics_get callback. And it is calculated in the time period specified in set_reduction_frequency.
Thank you in advance. I am kind of overwhelmed right now :slight_smile: