Closed Xav1204 closed 1 year ago
@bastianilso I've created this pull request for the new saving system. Please tell me if it looks right for you.
@bastianilso I've made the changes, the multi saving still working and the savelog function is not removed.
Please, tell me if it's right for you now.
@bastianilso I have one question about the API. How does the API save files? Do we need to specify the file's label to save or the API recuperate itself all the logslist's label for creating a "for" loop to save all the logslist's datas?
@Xav1204 SaveLog
takes a specific collectionLabel
as input and saves the specified collection. LoggingManager always saves one collection as one file. SaveLog Accesses the collection's logStore
by performing a lookup on logsList
using collectionLabel
. After saving the logStore, if clear
is true
, then the entry is removed from logsList
. If the entry was Meta
, we can call the CreateMetaCollection function again within LoggingManager.
Is this what you asked for?
@bastianilso thanks for your answer. I will see what I can do with this function for the multi saving system.
@bastianilso I've made changes. So, as we delete the different logsList's element in the SaveLog function. If we use a foreach loop in SaveAllLogs function, we have a problem because the number of elements has changed duriing the save and a compilator error appeared. Therefore, I now store the differents logsList's labels in a list and when the label to save = the last label in the list, I clear the list for the next save. Moreover, as the sql saving system isn't operational, I didn't make the changes for this kind of save. Do I need to make changes for the sql save? I've also fixed the bug about the meta csv file because it's just one line of code to add
@bastianilso I've made changes. I think it's right now.
@bastianilso I pushed the changes that I've made. Now, to remove the label and the logStore in the logsList, I use SaveCallBack function and I didn't change the parameters because I didn't know if I could change these ones. It would be better if we use the label and not the logStore to remove elements in logsList. Please, tell me what do you think about that. Moreover, I've created a new function that is used in SaveToCSV and SaveToSQL to update save informations. Although that I've created this function in this issue, I think that I will make all the modifications to do about the save state update in another pull request to not confuse the different code and being clearer in the process. Please, tell me if it looks right now or if you have any questions about the process.
In the new saving system, we've deleted useless functions in the process and also reorganized it to work with the logstore and not with the loglist to save the datas in the different csv files.