From 5c2d794ab17ce949fe342cf68158711a3bfa39c7 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 16 May 2016 15:15:19 +0800 Subject: [PATCH] DNN-8667: disable purge log buffer by default when event viewer control loaded. --- .../Dnn.Modules.LogViewer/LogViewer.ascx.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/DNN Platform/Admin Modules/Dnn.Modules.LogViewer/LogViewer.ascx.cs b/DNN Platform/Admin Modules/Dnn.Modules.LogViewer/LogViewer.ascx.cs index 5d3d5539562..d9a519c60be 100644 --- a/DNN Platform/Admin Modules/Dnn.Modules.LogViewer/LogViewer.ascx.cs +++ b/DNN Platform/Admin Modules/Dnn.Modules.LogViewer/LogViewer.ascx.cs @@ -367,7 +367,12 @@ protected override void OnLoad(EventArgs e) { txtSubject.Text = Localization.GetString("LogEntryDefaultSubject", LocalResourceFile); txtMessage.Text = Localization.GetString("LogEntryDefaultMsg", LocalResourceFile); - LogController.Instance.PurgeLogBuffer(); + + if (AutoPurgeLogBuffer) + { + LogController.Instance.PurgeLogBuffer(); + } + if (Request.QueryString["PageRecords"] != null) { ddlRecordsPerPage.SelectedValue = Request.QueryString["PageRecords"]; @@ -498,6 +503,14 @@ public void BindData() public string EventFilter { get; set; } + public bool AutoPurgeLogBuffer + { + get + { + return Settings.ContainsKey("AutoPurgeLogBuffer") && Convert.ToBoolean(Settings["AutoPurgeLogBuffer"]); + } + } + #endregion }