diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs b/Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs index 8001caac8..9deb93132 100644 --- a/Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs +++ b/Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs @@ -28,12 +28,12 @@ namespace Tango.Telemetry.Sources _lastFirmwareMessage = new KeyValuePair<DateTime, string>(DateTime.MinValue, String.Empty); } - public TelemetryLogsStreamingSource(IMachineOperator machineOperator) + public TelemetryLogsStreamingSource(IMachineOperator machineOperator) : this() { MachineOperator = machineOperator; } - public void Start() + public virtual void Start() { if (!IsStarted) { @@ -47,13 +47,14 @@ namespace Tango.Telemetry.Sources { if (IsStarted) { - if (Config.Categories.Contains((LogCategory)log.Category)) return; + if (!Config.Categories.Contains((LogCategory)log.Category)) return; if (log.Message == _lastFirmwareMessage.Value && DateTime.UtcNow < _lastFirmwareMessage.Key.AddSeconds(1)) return; _lastFirmwareMessage = new KeyValuePair<DateTime, string>(DateTime.UtcNow, log.Message); TelemetryLog tLog = new TelemetryLog(); + tLog.Source = "Firmware"; tLog.Time = DateTime.UtcNow; tLog.Category = log.Category.ToString(); tLog.Class = log.FileName; @@ -68,9 +69,10 @@ namespace Tango.Telemetry.Sources { if (IsStarted) { - if (Config.Categories.Contains(log.Category)) return; + if (!Config.Categories.Contains(log.Category)) return; TelemetryLog tLog = new TelemetryLog(); + tLog.Source = "Application"; tLog.Time = log.TimeStamp.ToUniversalTime(); tLog.Category = log.Category.ToString(); tLog.Class = log.ClassName; |
