aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/src/SampleBaseForEditor.cs
diff options
context:
space:
mode:
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;