|
|
@@ -73,8 +73,9 @@ namespace MySystem.Controllers
|
|
|
return View();
|
|
|
}
|
|
|
|
|
|
- public async Task<IList<IDictionary<string, string>>> LogSelectResult(string condi)
|
|
|
+ public async Task<string> LogSelectResult(string condi)
|
|
|
{
|
|
|
+ string result = "";
|
|
|
string[] condiList = condi.Split('|');
|
|
|
string logstore = "connect-log";
|
|
|
string topic = condiList[0];
|
|
|
@@ -85,7 +86,13 @@ namespace MySystem.Controllers
|
|
|
logstore = "spserver";
|
|
|
}
|
|
|
IList<IDictionary<string, string>> logs = await SLS.GetLogs(logstore, topic, "* and content: " + keyword, DateTimeOffset.Now.AddMonths(-int.Parse(month)));
|
|
|
- return logs;
|
|
|
+ foreach(IDictionary<string, string> log in logs)
|
|
|
+ {
|
|
|
+ result += log["__tag__:datetime"] + "\n";
|
|
|
+ result += log["content"] + "\n";
|
|
|
+ result += "\n--------------------------------------------------------------------------------------------------\n\n";
|
|
|
+ }
|
|
|
+ return result;
|
|
|
}
|
|
|
}
|
|
|
}
|