Skip to content

Commit 93fd0a1

Browse files
committed
Fix for Issue #363
Still need to make sure procedure is in the database!
1 parent e03f603 commit 93fd0a1

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

OSAE.API/General/OSAELog.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public OSAELog(string source)
4242
}
4343
}
4444

45-
try
45+
try
4646
{
4747
bPrune = Convert.ToBoolean(OSAEObjectPropertyManager.GetObjectPropertyValue("SYSTEM", "Prune Logs").Value);
4848
}
@@ -152,6 +152,19 @@ public static void Clear()
152152
}
153153
}
154154

155+
public static void Clear_Log(string log)
156+
{
157+
using (MySqlCommand command = new MySqlCommand())
158+
{
159+
command.CommandText = "CALL osae_sp_server_log_clear_logger(@log)";
160+
command.Parameters.AddWithValue("@log", log);
161+
try
162+
{ OSAESql.RunQuery(command); }
163+
catch (Exception ex)
164+
{ throw ex; }
165+
}
166+
}
167+
155168
public static DataSet LoadSources()
156169
{
157170
using (MySqlCommand command = new MySqlCommand())

UI/Web/logs.aspx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ protected void btnRefresh_Click(object sender, EventArgs e)
5858
protected void btnClear_Click(object sender, EventArgs e)
5959
{
6060
DropDownList ddlSource2 = (DropDownList)gvLog.HeaderRow.FindControl("ddlSource");
61-
if (ddlSource2.Text == "All")
61+
if (ddlSource2.Text == "ALL")
6262
{
6363
OSAE.General.OSAELog.Clear();
6464
}

0 commit comments

Comments
 (0)