aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2025-08-17 19:50:32 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2025-08-17 19:50:32 +0300
commit4fcf044cc0a4265f6c9c2aad2a3a7aad92eafefa (patch)
treea3b146dadddc5bd67350ee837af0499c53308478 /Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs
parentd150ca010285dc76add9d9f5606dd6d150a610c5 (diff)
downloadTango-4fcf044cc0a4265f6c9c2aad2a3a7aad92eafefa.tar.gz
Tango-4fcf044cc0a4265f6c9c2aad2a3a7aad92eafefa.zip
Telemetry Logs & Events.
Diffstat (limited to 'Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs')
-rw-r--r--Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs19
1 files changed, 3 insertions, 16 deletions
diff --git a/Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs b/Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs
index 9deb93132..2c8020f7c 100644
--- a/Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs
+++ b/Software/Visual_Studio/Tango.Telemetry/Sources/TelemetryLogsStreamingSource.cs
@@ -5,6 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using Tango.Integration.Operation;
using Tango.Logging;
+using Tango.Telemetry.Mappers;
using Tango.Telemetry.Telemetries;
namespace Tango.Telemetry.Sources
@@ -53,14 +54,7 @@ namespace Tango.Telemetry.Sources
_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;
- tLog.Method = $"[{log.ModuleId}] [{log.Filter}] [{log.Parameter}]";
- tLog.Line = log.LineNumber;
- tLog.Message = log.Message;
+ TelemetryLog tLog = LogMapper.MapLog(log);
TelemetryAvailable?.Invoke(this, new TelemetryAvailableEventArgs() { TelemetryObject = tLog });
}
}
@@ -71,14 +65,7 @@ namespace Tango.Telemetry.Sources
{
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;
- tLog.Method = log.CallerMethodName;
- tLog.Line = log.CallerLineNumber;
- tLog.Message = log.Message;
+ TelemetryLog tLog = LogMapper.MapLog(log);
TelemetryAvailable?.Invoke(this, new TelemetryAvailableEventArgs() { TelemetryObject = tLog });
}
}