1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

icons logging

This commit is contained in:
Kyle Spearrin 2018-07-10 00:09:18 -04:00
parent 9fee09e204
commit 17ec153fa7
4 changed files with 21 additions and 12 deletions

View File

@ -22,6 +22,7 @@
<option asp-selected="@(Model.Project == "Events")" value="Events">Events</option>
<option asp-selected="@(Model.Project == "Identity")" value="Identity">Identity</option>
<option asp-selected="@(Model.Project == "Scim")" value="Scim">Scim</option>
<option asp-selected="@(Model.Project == "Icons")" value="Icons">Icons</option>
</select>
<button type="submit" class="btn btn-primary mb-2" title="Search"><i class="fa fa-search"></i> Search</button>
</form>

View File

@ -22,4 +22,8 @@
<EmbeddedResource Include="Resources\public_suffix_list.dat" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj" />
</ItemGroup>
</Project>

View File

@ -1,11 +1,15 @@
using System;
using Bit.Core;
using Bit.Core.Utilities;
using Bit.Icons.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Net.Http.Headers;
using Serilog.Events;
namespace Bit.Icons
{
@ -24,6 +28,7 @@ namespace Bit.Icons
services.AddOptions();
// Settings
var globalSettings = services.AddGlobalSettingsServices(Configuration);
var iconsSettings = new IconsSettings();
ConfigurationBinder.Bind(Configuration.GetSection("IconsSettings"), iconsSettings);
services.AddSingleton(s => iconsSettings);
@ -44,8 +49,13 @@ namespace Bit.Icons
public void Configure(
IApplicationBuilder app,
IHostingEnvironment env)
IHostingEnvironment env,
ILoggerFactory loggerFactory,
IApplicationLifetime appLifetime,
GlobalSettings globalSettings)
{
loggerFactory.AddSerilog(app, env, appLifetime, globalSettings, (e) => e.Level >= LogEventLevel.Error);
if(env.IsDevelopment())
{
app.UseDeveloperExceptionPage();

View File

@ -1,15 +1,9 @@
{
"Logging": {
"IncludeScopes": false,
"Debug": {
"LogLevel": {
"Default": "Warning"
}
},
"Console": {
"LogLevel": {
"Default": "Warning"
}
"globalSettings": {
"projectName": "Icons",
"documentDb": {
"uri": "SECRET",
"key": "SECRET"
}
},
"iconsSettings": {