Fixed logging bugs
This commit is contained in:
parent
476f7a2b19
commit
e4f84fb869
3 changed files with 10 additions and 5 deletions
|
@ -156,10 +156,15 @@ namespace WebsitePanel.EnterpriseServer
|
|||
log.Severity, log.Text, log.TextIdent, BuildParametersXml(log.TextParameters));
|
||||
}
|
||||
|
||||
public static List<BackgroundTaskLogRecord> GetLogs(int taskId, DateTime startLogTime)
|
||||
public static List<BackgroundTaskLogRecord> GetLogs(BackgroundTask task, DateTime startLogTime)
|
||||
{
|
||||
if (startLogTime <= task.StartDate)
|
||||
{
|
||||
startLogTime = task.StartDate;
|
||||
}
|
||||
|
||||
List<BackgroundTaskLogRecord> logs = ObjectUtils.CreateListFromDataReader<BackgroundTaskLogRecord>(
|
||||
DataProvider.GetBackgroundTaskLogs(taskId, startLogTime));
|
||||
DataProvider.GetBackgroundTaskLogs(task.Id, startLogTime));
|
||||
|
||||
foreach (BackgroundTaskLogRecord log in logs)
|
||||
{
|
||||
|
|
|
@ -512,7 +512,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
if (task == null)
|
||||
return null;
|
||||
|
||||
task.Logs = TaskController.GetLogs(task.Id, startLogTime);
|
||||
task.Logs = TaskController.GetLogs(task, startLogTime);
|
||||
|
||||
return task;
|
||||
}
|
||||
|
@ -600,7 +600,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
private static void AddAuditLog(BackgroundTask task)
|
||||
{
|
||||
task.Logs = TaskController.GetLogs(task.Id, task.StartDate);
|
||||
task.Logs = TaskController.GetLogs(task, task.StartDate);
|
||||
|
||||
string executionLog = FormatExecutionLog(task);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue