refactor: Replace old BlueEventLog w/ (Spark) Log

This commit is contained in:
John Colvin committed 2023-09-21 23:48:57 -04:00
1 parent 4446eb0412
commit 80c4542942
2 files changed
+10 -8

No files matched your search

@@ -1,3 +1,5 @@
using bts;
using System;
using System.Drawing;
using System.Collections;
@@ -185,7 +187,7 @@ namespace BCG
}
catch (Exception exc)
{
BCG.Utilities.BlueEventLog.logEvent(exc);
Log.Ui.warn(exc.ToString());
myDataGrid.DataSource = null;
myTabControl.SelectedIndex = 2;
@@ -242,7 +244,7 @@ namespace BCG
}
catch (Exception exc)
{
BCG.Utilities.BlueEventLog.logEvent(exc);
Log.Ui.warn(exc.ToString());
myDataGrid.DataSource = null;
myTabControl.SelectedIndex = 1;
@@ -308,17 +310,17 @@ namespace BCG
{
DataPacket dp = o as DataPacket;
myCrono.stop();
BlueEventLog.logEvent ("Received callback for " + dp.schema.tableName);
Log.Ui.diag($"Received callback for {dp.schema.tableName}");
if (o == null)
{
System.Windows.Forms.MessageBox.Show (this, "Received a Null Data packet",
"Invalid Data", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
BlueEventLog.logEvent(dp.toIncrementalIDString(), BlueEventLevel.Diagnosis);
Log.Ui.diag(dp.toIncrementalIDString());
myToolStripStatusLabelTime.Text = "Last update: " + DateTime.Now.ToString ("hh:mm:ss:fff tt");
myToolStripStatusLabelRows.Text = "New = " + dp.newRows.Count + " Added = " + dp.addedRows.Count + " Deleted = " + dp.deletedRows.Count;
BlueEventLog.logEvent(Text, BlueEventLevel.Diagnosis);
Log.Ui.diag(Text);
int hscrollval = myChangeStyle ? 0 : myDataGrid.HorizScrollBarValue;
myDataGrid.DataSource = new SimpleBindableCollection (dp.newRows.schema, dp.newRows);
@@ -375,7 +377,7 @@ namespace BCG
}
catch (Exception exc)
{
BCG.Utilities.BlueEventLog.logEvent(exc);
Log.Ui.warn(exc.ToString());
myDataGrid.DataSource = null;
//myTabControl.SelectedIndex = 1;
@@ -736,7 +738,7 @@ namespace BCG
return _sort_dicts_index(r1, r2, 5, true);
});
timer.stop();
BCG.Utilities.BlueEventLog.logEvent(String.Format("nrows = {0} sorting time = {1}", rows.Count, timer.lastIntervalTime), BCG.Utilities.BlueEventLevel.Performance);
Log.Ui.diag($"nrows = {rows.Count} sorting time = {timer.lastIntervalTime}");
}
}