1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-06 05:28:15 -05: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 == "Events")" value="Events">Events</option>
<option asp-selected="@(Model.Project == "Identity")" value="Identity">Identity</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 == "Scim")" value="Scim">Scim</option>
<option asp-selected="@(Model.Project == "Icons")" value="Icons">Icons</option>
</select> </select>
<button type="submit" class="btn btn-primary mb-2" title="Search"><i class="fa fa-search"></i> Search</button> <button type="submit" class="btn btn-primary mb-2" title="Search"><i class="fa fa-search"></i> Search</button>
</form> </form>

View File

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

View File

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

View File

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