Logging Enhancements (#1521)

* Recreated Kavita Logging with Serilog instead of Default. This needs to be move out of the appsettings now, to allow auto updater to patch.

* Refactored the code to be completely configured via Code rather than appsettings.json. This is a required step for Auto Updating.

* Added in the ability to send logs directly to the UI only for users on the log route. Stopping implementation as Alerts page will handle the rest of the implementation.

* Fixed up the backup service to not rely on Config from appsettings.json

* Tweaked the Logging levels available

* Moved everything over to File-scoped namespaces

* Moved everything over to File-scoped namespaces

* Code cleanup, removed an old migration and changed so debug logging doesn't print sensitive db data

* Removed dead code
This commit is contained in:
Joseph Milazzo 2022-09-12 19:25:48 -05:00 committed by GitHub
parent 9f715cc35f
commit d1a14f7e68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
212 changed files with 16599 additions and 16834 deletions

View file

@ -3,101 +3,100 @@ using System.Runtime.InteropServices;
using API.Entities;
using API.Entities.Enums;
namespace API.DTOs.Filtering
namespace API.DTOs.Filtering;
public class FilterDto
{
public class FilterDto
{
/// <summary>
/// The type of Formats you want to be returned. An empty list will return all formats back
/// </summary>
public IList<MangaFormat> Formats { get; init; } = new List<MangaFormat>();
/// <summary>
/// The type of Formats you want to be returned. An empty list will return all formats back
/// </summary>
public IList<MangaFormat> Formats { get; init; } = new List<MangaFormat>();
/// <summary>
/// The progress you want to be returned. This can be bitwise manipulated. Defaults to all applicable states.
/// </summary>
public ReadStatus ReadStatus { get; init; } = new ReadStatus();
/// <summary>
/// The progress you want to be returned. This can be bitwise manipulated. Defaults to all applicable states.
/// </summary>
public ReadStatus ReadStatus { get; init; } = new ReadStatus();
/// <summary>
/// A list of library ids to restrict search to. Defaults to all libraries by passing empty list
/// </summary>
public IList<int> Libraries { get; init; } = new List<int>();
/// <summary>
/// A list of Genre ids to restrict search to. Defaults to all genres by passing an empty list
/// </summary>
public IList<int> Genres { get; init; } = new List<int>();
/// <summary>
/// A list of Writers to restrict search to. Defaults to all Writers by passing an empty list
/// </summary>
public IList<int> Writers { get; init; } = new List<int>();
/// <summary>
/// A list of Penciller ids to restrict search to. Defaults to all Pencillers by passing an empty list
/// </summary>
public IList<int> Penciller { get; init; } = new List<int>();
/// <summary>
/// A list of Inker ids to restrict search to. Defaults to all Inkers by passing an empty list
/// </summary>
public IList<int> Inker { get; init; } = new List<int>();
/// <summary>
/// A list of Colorist ids to restrict search to. Defaults to all Colorists by passing an empty list
/// </summary>
public IList<int> Colorist { get; init; } = new List<int>();
/// <summary>
/// A list of Letterer ids to restrict search to. Defaults to all Letterers by passing an empty list
/// </summary>
public IList<int> Letterer { get; init; } = new List<int>();
/// <summary>
/// A list of CoverArtist ids to restrict search to. Defaults to all CoverArtists by passing an empty list
/// </summary>
public IList<int> CoverArtist { get; init; } = new List<int>();
/// <summary>
/// A list of Editor ids to restrict search to. Defaults to all Editors by passing an empty list
/// </summary>
public IList<int> Editor { get; init; } = new List<int>();
/// <summary>
/// A list of Publisher ids to restrict search to. Defaults to all Publishers by passing an empty list
/// </summary>
public IList<int> Publisher { get; init; } = new List<int>();
/// <summary>
/// A list of Character ids to restrict search to. Defaults to all Characters by passing an empty list
/// </summary>
public IList<int> Character { get; init; } = new List<int>();
/// <summary>
/// A list of Translator ids to restrict search to. Defaults to all Translatorss by passing an empty list
/// </summary>
public IList<int> Translators { get; init; } = new List<int>();
/// <summary>
/// A list of Collection Tag ids to restrict search to. Defaults to all Collection Tags by passing an empty list
/// </summary>
public IList<int> CollectionTags { get; init; } = new List<int>();
/// <summary>
/// A list of Tag ids to restrict search to. Defaults to all Tags by passing an empty list
/// </summary>
public IList<int> Tags { get; init; } = new List<int>();
/// <summary>
/// Will return back everything with the rating and above
/// <see cref="AppUserRating.Rating"/>
/// </summary>
public int Rating { get; init; }
/// <summary>
/// Sorting Options for a query. Defaults to null, which uses the queries natural sorting order
/// </summary>
public SortOptions SortOptions { get; set; } = null;
/// <summary>
/// Age Ratings. Empty list will return everything back
/// </summary>
public IList<AgeRating> AgeRating { get; init; } = new List<AgeRating>();
/// <summary>
/// Languages (ISO 639-1 code) to filter by. Empty list will return everything back
/// </summary>
public IList<string> Languages { get; init; } = new List<string>();
/// <summary>
/// Publication statuses to filter by. Empty list will return everything back
/// </summary>
public IList<PublicationStatus> PublicationStatus { get; init; } = new List<PublicationStatus>();
/// <summary>
/// A list of library ids to restrict search to. Defaults to all libraries by passing empty list
/// </summary>
public IList<int> Libraries { get; init; } = new List<int>();
/// <summary>
/// A list of Genre ids to restrict search to. Defaults to all genres by passing an empty list
/// </summary>
public IList<int> Genres { get; init; } = new List<int>();
/// <summary>
/// A list of Writers to restrict search to. Defaults to all Writers by passing an empty list
/// </summary>
public IList<int> Writers { get; init; } = new List<int>();
/// <summary>
/// A list of Penciller ids to restrict search to. Defaults to all Pencillers by passing an empty list
/// </summary>
public IList<int> Penciller { get; init; } = new List<int>();
/// <summary>
/// A list of Inker ids to restrict search to. Defaults to all Inkers by passing an empty list
/// </summary>
public IList<int> Inker { get; init; } = new List<int>();
/// <summary>
/// A list of Colorist ids to restrict search to. Defaults to all Colorists by passing an empty list
/// </summary>
public IList<int> Colorist { get; init; } = new List<int>();
/// <summary>
/// A list of Letterer ids to restrict search to. Defaults to all Letterers by passing an empty list
/// </summary>
public IList<int> Letterer { get; init; } = new List<int>();
/// <summary>
/// A list of CoverArtist ids to restrict search to. Defaults to all CoverArtists by passing an empty list
/// </summary>
public IList<int> CoverArtist { get; init; } = new List<int>();
/// <summary>
/// A list of Editor ids to restrict search to. Defaults to all Editors by passing an empty list
/// </summary>
public IList<int> Editor { get; init; } = new List<int>();
/// <summary>
/// A list of Publisher ids to restrict search to. Defaults to all Publishers by passing an empty list
/// </summary>
public IList<int> Publisher { get; init; } = new List<int>();
/// <summary>
/// A list of Character ids to restrict search to. Defaults to all Characters by passing an empty list
/// </summary>
public IList<int> Character { get; init; } = new List<int>();
/// <summary>
/// A list of Translator ids to restrict search to. Defaults to all Translatorss by passing an empty list
/// </summary>
public IList<int> Translators { get; init; } = new List<int>();
/// <summary>
/// A list of Collection Tag ids to restrict search to. Defaults to all Collection Tags by passing an empty list
/// </summary>
public IList<int> CollectionTags { get; init; } = new List<int>();
/// <summary>
/// A list of Tag ids to restrict search to. Defaults to all Tags by passing an empty list
/// </summary>
public IList<int> Tags { get; init; } = new List<int>();
/// <summary>
/// Will return back everything with the rating and above
/// <see cref="AppUserRating.Rating"/>
/// </summary>
public int Rating { get; init; }
/// <summary>
/// Sorting Options for a query. Defaults to null, which uses the queries natural sorting order
/// </summary>
public SortOptions SortOptions { get; set; } = null;
/// <summary>
/// Age Ratings. Empty list will return everything back
/// </summary>
public IList<AgeRating> AgeRating { get; init; } = new List<AgeRating>();
/// <summary>
/// Languages (ISO 639-1 code) to filter by. Empty list will return everything back
/// </summary>
public IList<string> Languages { get; init; } = new List<string>();
/// <summary>
/// Publication statuses to filter by. Empty list will return everything back
/// </summary>
public IList<PublicationStatus> PublicationStatus { get; init; } = new List<PublicationStatus>();
/// <summary>
/// An optional name string to filter by. Empty string will ignore.
/// </summary>
public string SeriesNameQuery { get; init; } = string.Empty;
}
/// <summary>
/// An optional name string to filter by. Empty string will ignore.
/// </summary>
public string SeriesNameQuery { get; init; } = string.Empty;
}