aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2018-07-18 17:52:17 +0300
committerAvi Levkovich <avi@twine-s.com>2018-07-18 17:52:17 +0300
commite0d570b8994b5d8ac3733075df9aa4d25e723131 (patch)
tree261ebcd32f07ec43cf29030036c077258d8c03a7 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs
parente0c19a620f338848b130ad6d2bd0ce8d5a52ca93 (diff)
parentdf566bfe8b0f5ab0978dc3fa600052cd300fc577 (diff)
downloadTango-e0d570b8994b5d8ac3733075df9aa4d25e723131.tar.gz
Tango-e0d570b8994b5d8ac3733075df9aa4d25e723131.zip
merge build date
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs
index 0a4af6218..b33b771ae 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs
@@ -234,7 +234,7 @@ namespace Tango.MachineStudio.Common.EventLogging
/// </summary>
/// <param name="eventType">Type of the event.</param>
/// <param name="message">The message.</param>
- public void Log(EventTypes eventType, string message)
+ public void Log(EventTypes eventType, string message, bool write_to_db = true)
{
Init();
@@ -244,7 +244,14 @@ namespace Tango.MachineStudio.Common.EventLogging
machineEvent.EventType = _eventTypesGuids[eventType];
machineEvent.EventTypeGuid = machineEvent.EventType.Guid;
- Log(machineEvent);
+ if (write_to_db)
+ {
+ Log(machineEvent);
+ }
+ else
+ {
+ NewLog?.Invoke(this, machineEvent);
+ }
}
/// <summary>