mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Adding debug logs
This commit is contained in:
parent
ec383ffeac
commit
c5b6b62925
@ -18,6 +18,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Serilog" Version="2.9.0" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
|
||||
<ProjectReference Include="../Kyoo.Common/Kyoo.Common.csproj" />
|
||||
|
||||
<PackageReference Include="IdentityServer4" Version="3.1.2" />
|
||||
|
@ -23,11 +23,14 @@ namespace Kyoo
|
||||
{
|
||||
ClientId = "kyoo.webapp",
|
||||
AllowedGrantTypes = GrantTypes.Code,
|
||||
RequirePkce = true,
|
||||
AllowAccessTokensViaBrowser = true,
|
||||
AllowOfflineAccess = true,
|
||||
RequireClientSecret = false,
|
||||
RequireConsent = false,
|
||||
AccessTokenType = AccessTokenType.Reference,
|
||||
AllowedScopes = { "kyoo.admin", "kyoo.write", "kyoo.read", "openid", "profile" },
|
||||
RedirectUris = { "/logged", "/silent" },
|
||||
RedirectUris = { "/silent", "/" },
|
||||
PostLogoutRedirectUris = { "/logout" }
|
||||
}
|
||||
};
|
||||
|
@ -4,6 +4,9 @@ using Kyoo.Controllers;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Serilog;
|
||||
using Serilog.Events;
|
||||
using Serilog.Sinks.SystemConsole.Themes;
|
||||
|
||||
namespace Kyoo
|
||||
{
|
||||
@ -11,12 +14,25 @@ namespace Kyoo
|
||||
{
|
||||
public static async Task Main(string[] args)
|
||||
{
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.MinimumLevel.Verbose()
|
||||
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
|
||||
.MinimumLevel.Override("System", LogEventLevel.Warning)
|
||||
.MinimumLevel.Override("Microsoft.AspNetCore.Authentication", LogEventLevel.Information)
|
||||
.Enrich.FromLogContext()
|
||||
.WriteTo.Console(
|
||||
outputTemplate:
|
||||
"[{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}",
|
||||
theme: AnsiConsoleTheme.Literate)
|
||||
.CreateLogger();
|
||||
|
||||
Console.WriteLine($"Running as: {Environment.UserName}");
|
||||
await CreateWebHostBuilder(args).Build().RunAsync();
|
||||
}
|
||||
|
||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.UseSerilog()
|
||||
.UseKestrel((config) => { config.AddServerHeader = false; })
|
||||
.UseUrls("http://*:5000")
|
||||
.UseStartup<Startup>();
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit a0c75642302151caf6fc0c616305f569cc6557e5
|
||||
Subproject commit afdddfd7b12d9e31367cec4ad20c3ea2ac169f0c
|
Loading…
x
Reference in New Issue
Block a user