Fix Management system.web sample logging issues

This commit is contained in:
Tim Hess 2020-01-15 18:17:44 -05:00
Родитель d9533d73cf
Коммит 5c6e078bf2
4 изменённых файлов: 45 добавлений и 30 удалений

Просмотреть файл

@ -1,7 +1,6 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Console;
using Steeltoe.Extensions.Logging;
namespace CloudFoundryWeb
@ -13,9 +12,13 @@ namespace CloudFoundryWeb
public static void Configure(IConfiguration configuration)
{
IServiceCollection serviceCollection = new Microsoft.Extensions.DependencyInjection.ServiceCollection();
serviceCollection.AddLogging(builder => builder.SetMinimumLevel(LogLevel.Trace));
serviceCollection.AddLogging(builder => builder.AddDynamicConsole());
IServiceCollection serviceCollection = new ServiceCollection();
serviceCollection.AddLogging(builder => {
builder
.SetMinimumLevel(LogLevel.Trace)
.AddConfiguration(configuration)
.AddDynamicConsole();
});
LoggerFactory = serviceCollection.BuildServiceProvider().GetService<ILoggerFactory>();
}
}

Просмотреть файл

@ -115,6 +115,9 @@
<Reference Include="Microsoft.Extensions.FileSystemGlobbing, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.FileSystemGlobbing.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Hosting, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Hosting.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Hosting.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Hosting.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Hosting.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll</HintPath>
</Reference>
@ -149,40 +152,40 @@
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Steeltoe.CloudFoundry.ConnectorBase, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steeltoe.CloudFoundry.ConnectorBase.2.4.0-ci1177\lib\netstandard2.0\Steeltoe.CloudFoundry.ConnectorBase.dll</HintPath>
<HintPath>..\packages\Steeltoe.CloudFoundry.ConnectorBase.2.4.0\lib\netstandard2.0\Steeltoe.CloudFoundry.ConnectorBase.dll</HintPath>
</Reference>
<Reference Include="Steeltoe.Common, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steeltoe.Common.2.4.0-ci1177\lib\netstandard2.0\Steeltoe.Common.dll</HintPath>
<HintPath>..\packages\Steeltoe.Common.2.4.0\lib\netstandard2.0\Steeltoe.Common.dll</HintPath>
</Reference>
<Reference Include="Steeltoe.Common.Http, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steeltoe.Common.Http.2.4.0-ci1177\lib\netstandard2.0\Steeltoe.Common.Http.dll</HintPath>
<HintPath>..\packages\Steeltoe.Common.Http.2.4.0\lib\netstandard2.0\Steeltoe.Common.Http.dll</HintPath>
</Reference>
<Reference Include="Steeltoe.Extensions.Configuration.CloudFoundryBase, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steeltoe.Extensions.Configuration.CloudFoundryBase.2.4.0-ci1177\lib\netstandard2.0\Steeltoe.Extensions.Configuration.CloudFoundryBase.dll</HintPath>
<HintPath>..\packages\Steeltoe.Extensions.Configuration.CloudFoundryBase.2.4.0\lib\netstandard2.0\Steeltoe.Extensions.Configuration.CloudFoundryBase.dll</HintPath>
</Reference>
<Reference Include="Steeltoe.Extensions.Logging.DynamicLogger, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steeltoe.Extensions.Logging.DynamicLogger.2.4.0-ci1177\lib\netstandard2.0\Steeltoe.Extensions.Logging.DynamicLogger.dll</HintPath>
<HintPath>..\packages\Steeltoe.Extensions.Logging.DynamicLogger.2.4.0\lib\netstandard2.0\Steeltoe.Extensions.Logging.DynamicLogger.dll</HintPath>
</Reference>
<Reference Include="Steeltoe.Management.Diagnostics, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steeltoe.Management.Diagnostics.2.4.0-ci1177\lib\netstandard2.0\Steeltoe.Management.Diagnostics.dll</HintPath>
<HintPath>..\packages\Steeltoe.Management.Diagnostics.2.4.0\lib\netstandard2.0\Steeltoe.Management.Diagnostics.dll</HintPath>
</Reference>
<Reference Include="Steeltoe.Management.EndpointBase, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steeltoe.Management.EndpointBase.2.4.0-ci1177\lib\netstandard2.0\Steeltoe.Management.EndpointBase.dll</HintPath>
<HintPath>..\packages\Steeltoe.Management.EndpointBase.2.4.0\lib\netstandard2.0\Steeltoe.Management.EndpointBase.dll</HintPath>
</Reference>
<Reference Include="Steeltoe.Management.EndpointWeb, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steeltoe.Management.EndpointWeb.2.4.0-ci1177\lib\net461\Steeltoe.Management.EndpointWeb.dll</HintPath>
<HintPath>..\packages\Steeltoe.Management.EndpointWeb.2.4.0\lib\net461\Steeltoe.Management.EndpointWeb.dll</HintPath>
</Reference>
<Reference Include="Steeltoe.Management.ExporterBase, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steeltoe.Management.ExporterBase.2.4.0-ci1177\lib\netstandard2.0\Steeltoe.Management.ExporterBase.dll</HintPath>
<HintPath>..\packages\Steeltoe.Management.ExporterBase.2.4.0\lib\netstandard2.0\Steeltoe.Management.ExporterBase.dll</HintPath>
</Reference>
<Reference Include="Steeltoe.Management.OpenCensus, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steeltoe.Management.OpenCensus.2.4.0-ci1177\lib\net46\Steeltoe.Management.OpenCensus.dll</HintPath>
<HintPath>..\packages\Steeltoe.Management.OpenCensus.2.4.0\lib\net46\Steeltoe.Management.OpenCensus.dll</HintPath>
</Reference>
<Reference Include="Steeltoe.Management.OpenCensus.Abstractions, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steeltoe.Management.OpenCensus.Abstractions.2.4.0-ci1177\lib\net45\Steeltoe.Management.OpenCensus.Abstractions.dll</HintPath>
<HintPath>..\packages\Steeltoe.Management.OpenCensus.Abstractions.2.4.0\lib\net45\Steeltoe.Management.OpenCensus.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Steeltoe.Management.OpenCensusBase, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steeltoe.Management.OpenCensusBase.2.4.0-ci1177\lib\netstandard2.0\Steeltoe.Management.OpenCensusBase.dll</HintPath>
<HintPath>..\packages\Steeltoe.Management.OpenCensusBase.2.4.0\lib\netstandard2.0\Steeltoe.Management.OpenCensusBase.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">

Просмотреть файл

@ -362,11 +362,11 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Hosting.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.1.0" newVersion="2.1.1.0" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.FileProviders.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.1.0" newVersion="2.1.1.0" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.DiaSymReader.PortablePdb" publicKeyToken="31bf3856ad364e35" culture="neutral" />
@ -400,6 +400,14 @@
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.FileProviders.Physical" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.codedom>

Просмотреть файл

@ -37,6 +37,7 @@
<package id="Microsoft.Extensions.FileProviders.Abstractions" version="2.2.0" targetFramework="net461" />
<package id="Microsoft.Extensions.FileProviders.Physical" version="2.2.0" targetFramework="net461" />
<package id="Microsoft.Extensions.FileSystemGlobbing" version="2.2.0" targetFramework="net461" />
<package id="Microsoft.Extensions.Hosting" version="2.1.0" targetFramework="net461" />
<package id="Microsoft.Extensions.Hosting.Abstractions" version="2.2.0" targetFramework="net461" />
<package id="Microsoft.Extensions.Http" version="2.1.1" targetFramework="net461" />
<package id="Microsoft.Extensions.Logging" version="2.1.1" targetFramework="net461" />
@ -51,18 +52,18 @@
<package id="Modernizr" version="2.8.3" targetFramework="net461" />
<package id="MySql.Data" version="6.10.8" targetFramework="net461" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
<package id="Steeltoe.CloudFoundry.ConnectorBase" version="2.4.0-ci1177" targetFramework="net461" />
<package id="Steeltoe.Common" version="2.4.0-ci1177" targetFramework="net461" />
<package id="Steeltoe.Common.Http" version="2.4.0-ci1177" targetFramework="net461" />
<package id="Steeltoe.Extensions.Configuration.CloudFoundryBase" version="2.4.0-ci1177" targetFramework="net461" />
<package id="Steeltoe.Extensions.Logging.DynamicLogger" version="2.4.0-ci1177" targetFramework="net461" />
<package id="Steeltoe.Management.Diagnostics" version="2.4.0-ci1177" targetFramework="net461" />
<package id="Steeltoe.Management.EndpointBase" version="2.4.0-ci1177" targetFramework="net461" />
<package id="Steeltoe.Management.EndpointWeb" version="2.4.0-ci1177" targetFramework="net461" />
<package id="Steeltoe.Management.ExporterBase" version="2.4.0-ci1177" targetFramework="net461" />
<package id="Steeltoe.Management.OpenCensus" version="2.4.0-ci1177" targetFramework="net461" />
<package id="Steeltoe.Management.OpenCensus.Abstractions" version="2.4.0-ci1177" targetFramework="net461" />
<package id="Steeltoe.Management.OpenCensusBase" version="2.4.0-ci1177" targetFramework="net461" />
<package id="Steeltoe.CloudFoundry.ConnectorBase" version="2.4.0" targetFramework="net461" />
<package id="Steeltoe.Common" version="2.4.0" targetFramework="net461" />
<package id="Steeltoe.Common.Http" version="2.4.0" targetFramework="net461" />
<package id="Steeltoe.Extensions.Configuration.CloudFoundryBase" version="2.4.0" targetFramework="net461" />
<package id="Steeltoe.Extensions.Logging.DynamicLogger" version="2.4.0" targetFramework="net461" />
<package id="Steeltoe.Management.Diagnostics" version="2.4.0" targetFramework="net461" />
<package id="Steeltoe.Management.EndpointBase" version="2.4.0" targetFramework="net461" />
<package id="Steeltoe.Management.EndpointWeb" version="2.4.0" targetFramework="net461" />
<package id="Steeltoe.Management.ExporterBase" version="2.4.0" targetFramework="net461" />
<package id="Steeltoe.Management.OpenCensus" version="2.4.0" targetFramework="net461" />
<package id="Steeltoe.Management.OpenCensus.Abstractions" version="2.4.0" targetFramework="net461" />
<package id="Steeltoe.Management.OpenCensusBase" version="2.4.0" targetFramework="net461" />
<package id="System.Buffers" version="4.5.0" targetFramework="net461" />
<package id="System.Collections.Immutable" version="1.7.0-preview1.19504.10" targetFramework="net461" />
<package id="System.ComponentModel.Annotations" version="4.7.0-preview1.19504.10" targetFramework="net461" />