aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-12-30 13:01:58 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-12-30 13:01:58 +0200
commit624d19b9b7e540e16f605dce4e1c82af60372099 (patch)
tree07889b00717d3a30bb0281ed0233543fabfc9aaf /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels
parentc4aa1735efed2c87e5056dde442211c08d3f66ff (diff)
parent7c56f0ff6a9ceb7148b6cab01bbac5ddf592acb2 (diff)
downloadTango-624d19b9b7e540e16f605dce4e1c82af60372099.tar.gz
Tango-624d19b9b7e540e16f605dce4e1c82af60372099.zip
merge
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs22
1 files changed, 6 insertions, 16 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs
index a384c133d..91cc677e0 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs
@@ -59,14 +59,14 @@ namespace Tango.MachineStudio.Logging.ViewModels
}
}
- private bool _processDebugLogs;
+ private bool _displayDebug;
/// <summary>
/// Gets or sets a value indicating whether display debug logs.
/// </summary>
- public bool ProcessDebugLogs
+ public bool DisplayDebug
{
- get { return _processDebugLogs; }
- set { _processDebugLogs = value; RaisePropertyChangedAuto(); OnProcessDebugLogsChanged(); }
+ get { return _displayDebug; }
+ set { _displayDebug = value; RaisePropertyChangedAuto(); }
}
private LogItemBase _selectedLog;
@@ -184,18 +184,6 @@ namespace Tango.MachineStudio.Logging.ViewModels
_is_debug = LogManager.Categories.Contains(LogCategory.Debug);
}
- private void OnProcessDebugLogsChanged()
- {
- if (ProcessDebugLogs)
- {
- LogManager.Categories.Add(LogCategory.Debug);
- }
- else
- {
- LogManager.Categories.RemoveAll(x => x == LogCategory.Debug);
- }
- }
-
private void ApplyLogsFilter()
{
if ((_realTimePaused && _isRealTime) || !_isRealTime)
@@ -216,6 +204,8 @@ namespace Tango.MachineStudio.Logging.ViewModels
private void LogManager_NewLog(object sender, LogItemBase log)
{
+ if (log.Category == LogCategory.Debug && !DisplayDebug) return;
+
if (!RealTimePaused)
{
InvokeUI(() =>