private void SaveToSQL(string label, bool clear) { if (!enableMySQLSave) { return; } if (!logsList.ContainsKey(label)) { Debug.LogError("Could not find collection " + label + ". Aborting."); logsList[label].RemoveSavingTarget(TargetType.MySql); return; } if (logsList[label].RowCount == 0) { Debug.LogError("Collection " + label + " is empty. Aborting."); logsList[label].RemoveSavingTarget(TargetType.MySql); return; } connectToMySQL.AddToUploadQueue(logsList[label], label); connectToMySQL.UploadNow(() => { logsList[label].RemoveSavingTarget(TargetType.MySql); logsList[label].TargetsSaved[TargetType.MySql] = true; SaveCallback(logsList[label], clear); }); }
// TODO: Write to log file on disk as backup public void UploadLogs() { mySQL.AddToUploadQueue(logCollection); mySQL.UploadNow(); foreach (string key in logCollection.Keys) { Debug.Log("Key: " + key + ", Count: " + logCollection[key].Count.ToString()); logCollection[key].Clear(); } }
public void sendLogs() //Send the logs { if (logs["Email"].Count == 0) { return; } connectToMySQL.AddToUploadQueue(logs); // connectToMySQL.UploadNow(); // resetLogs(); }
private void SaveToSQL(string label) { if (!enableMySQLSave) { return; } if (!collections.ContainsKey(label)) { Debug.LogError("Could not find collection " + label + ". Aborting."); return; } if (collections[label].log.Keys.Count == 0) { Debug.LogError("Collection " + label + " is empty. Aborting."); return; } connectToMySQL.AddToUploadQueue(collections[label].log, collections[label].label); connectToMySQL.UploadNow(); }