aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/src/SampleBaseForEditor.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-06-16 16:00:50 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-06-16 16:00:50 +0200
commit5115f379fc240b1250220910b14d69bb27a32c1e (patch)
tree1818ebcf5f2f5bd2f9730d85391217fcd1038c92 /Samples/common/src/SampleBaseForEditor.cs
parent58e1683bdbe1c169a1ab18b170283f8d171049a7 (diff)
using try/finally to ensure mutexes release
Diffstat (limited to 'Samples/common/src/SampleBaseForEditor.cs')
-rw-r--r--Samples/common/src/SampleBaseForEditor.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Samples/common/src/SampleBaseForEditor.cs b/Samples/common/src/SampleBaseForEditor.cs
index 4af718a2..54ad8777 100644
--- a/Samples/common/src/SampleBaseForEditor.cs
+++ b/Samples/common/src/SampleBaseForEditor.cs
@@ -98,6 +98,23 @@ namespace Samples
NotifyValueChanged(debugLogRecording);
}
}
+ public bool DebugLogToFile {
+ get => Configuration.Global.Get<bool> (nameof(DebugLogToFile));
+ set {
+ if (DebugLogToFile != value)
+ return;
+ Configuration.Global.Set (nameof(DebugLogToFile), value);
+ NotifyValueChanged(DebugLogToFile);
+ DbgLogger.ConsoleOutput = !value;
+ }
+ }
+ protected static void initDebugLog () {
+ DbgLogger.IncludeEvents = DbgEvtType.None;
+ DbgLogger.DiscardEvents = DbgEvtType.All;
+ //DbgLogger.DiscardEvents = DbgEvtType.All;
+ DbgLogger.ConsoleOutput = !Configuration.Global.Get<bool> (nameof (DebugLogToFile));
+ }
+
public new bool IsDirty => source != origSource;