mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
Default Log view uses client operations, added all logs view that uses paging (No support for sorting or filtering).
This commit is contained in:
parent
179de93a6e
commit
c13c9d15c4
11 changed files with 146 additions and 15 deletions
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NLog;
|
||||
using PetaPoco;
|
||||
|
||||
|
@ -21,6 +22,20 @@ namespace NzbDrone.Core.Instrumentation
|
|||
return _database.Fetch<Log>();
|
||||
}
|
||||
|
||||
public IList<Log> TopLogs()
|
||||
{
|
||||
var logs = _database.Fetch<Log>("SELECT TOP 7500 * FROM Logs ORDER BY Time Desc");
|
||||
logs.Add(new Log
|
||||
{
|
||||
Time = DateTime.Now.AddYears(-100),
|
||||
Level = "Info",
|
||||
Logger = "NzbDrone.Core.Instrumentation.LogProvider",
|
||||
Message = String.Format("Number of logs currently shown: 7500. More may exist, check 'All' to see everything")
|
||||
});
|
||||
|
||||
return logs;
|
||||
}
|
||||
|
||||
public Page<Log> GetPagedLogs(int pageNumber, int pageSize)
|
||||
{
|
||||
return _database.Page<Log>(pageNumber, pageSize, "SELECT * FROM Logs ORDER BY Time DESC");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue