merge arthur_opening

pull/14/head
Arthur VALIN 3 years ago
parent 1697d3a900
commit bed4a8e2f7

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Before

Width:  |  Height:  |  Size: 852 KiB

After

Width:  |  Height:  |  Size: 852 KiB

Before

Width:  |  Height:  |  Size: 587 KiB

After

Width:  |  Height:  |  Size: 587 KiB

Before

Width:  |  Height:  |  Size: 877 KiB

After

Width:  |  Height:  |  Size: 877 KiB

@ -34,3 +34,6 @@
<p>Vous n'etes pas connecté</p>
</NotAuthorized>
</AuthorizeView>
<SurveyPrompt Title="How is Blazor working for you?" />
<SurveyPrompt Title="How is Blazor working for you?" />

@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Localization;
using CraftSharp.Models;
using Microsoft.Extensions.Logging;
namespace CraftSharp.Pages
{
@ -9,5 +10,18 @@ namespace CraftSharp.Pages
[Inject]
public IStringLocalizer<Index> Localizer { get; set; }
[Inject]
public ILogger<Index> Logger { get; set; }
private void CreateLogs()
{
var logLevels = Enum.GetValues(typeof(LogLevel)).Cast<LogLevel>();
foreach (var logLevel in logLevels.Where(l => l != LogLevel.None))
{
Logger.Log(logLevel, $"Log message for the level: {logLevel}");
}
}
}
}

@ -33,6 +33,7 @@ builder.Services.AddLocalization(opts => { opts.ResourcesPath = "Resources"; });
builder.Services.AddHttpClient();
builder.Services.AddBlazoredModal();
builder.Logging.AddConfiguration(builder.Configuration.GetSection("Logging"));
builder.Services
.AddBlazorise()

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Trace",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
Loading…
Cancel
Save