// Creates an entire new session for the specific log private void SetupNewLog() { // Clean loggers from previous session. They are cleaned afterwards because after log finishes, // logs are needed for postprocessing of ExciteOMeter level dictLoggers.Clear(); // Create new folder based on the time of creation of the session DateTime initialTimeLog = DateTime.Now; string folder_timeStamp = DateTime.Now.ToString(ExciteOMeterManager.GetFormatTimestampDateTime()); // If changed the format, change it in the OfflineAnalyzerManager.cs thisLogPath = folderToSaveLogs + "/" + folder_timeStamp + "_" + SettingsManager.Values.logSettings.sessionId + "/"; Directory.CreateDirectory(thisLogPath); recordingScreenshots = SettingsManager.Values.logSettings.recordScreenshots; screenshotPeriodSecs = SettingsManager.Values.logSettings.screenshotsPeriodSecs; if (recordingScreenshots) { Directory.CreateDirectory(thisLogPath + screenshot_folder); ScreenRecorder.instance.SetupScreenRecorder(thisLogPath + screenshot_folder, Camera.main); } // Setup loggers for this session foreach (DataLogger logger in loggers) { if (logger.logID == LogName.UNDEFINED) { Debug.LogError("Error configuring loggers. Please identify a unique logID from the list for the file" + logger.filename); } else if (dictLoggers.ContainsKey(logger.logID)) { Debug.LogError("Error configuring logger. Another log has been configured with the logID " + logger.logID + " in " + dictLoggers[logger.logID].filename + " . Please define a unique logId for the filename for " + logger.filename); } else { dictLoggers.Add(logger.logID, logger); logger.InitializeDataLogger(thisLogPath + logger.filename, logger.headers); } } }