Merge branch 'rel/2.0.0-preview1' into dev

This commit is contained in:
BrennanConroy 2017-05-03 10:39:46 -07:00
commit e96096e760
11 changed files with 38 additions and 23 deletions

View File

@ -7,6 +7,7 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.SignalR.Test.Server
{
@ -15,6 +16,12 @@ namespace Microsoft.AspNetCore.SignalR.Test.Server
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.ConfigureLogging(factory =>
{
factory.AddConsole();
factory.AddFilter("Console", level => level >= LogLevel.Information);
factory.AddDebug();
})
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()

View File

@ -17,11 +17,8 @@ namespace Microsoft.AspNetCore.SignalR.Test.Server
services.AddEndPoint<EchoEndPoint>();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
loggerFactory.AddConsole();
loggerFactory.AddDebug(LogLevel.Trace);
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();

View File

@ -3,6 +3,7 @@
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
namespace ChatSample
{
@ -11,6 +12,12 @@ namespace ChatSample
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.ConfigureLogging((context, factory) =>
{
factory.UseConfiguration(context.Configuration.GetSection("Logging"));
factory.AddConsole();
factory.AddDebug();
})
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()

View File

@ -13,7 +13,6 @@ using Microsoft.AspNetCore.SignalR.Redis;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace ChatSample
{
@ -74,11 +73,8 @@ namespace ChatSample
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();

View File

@ -1,12 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
namespace SocialWeather
{
@ -15,6 +12,11 @@ namespace SocialWeather
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.ConfigureLogging(factory =>
{
factory.AddConsole();
factory.AddFilter("Console", level => level >= LogLevel.Information);
})
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()

View File

@ -25,10 +25,8 @@ namespace SocialWeather
services.AddSingleton<FormatterResolver>();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
loggerFactory.AddConsole();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();

View File

@ -4,6 +4,7 @@
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace SocketsSample
{
@ -17,6 +18,10 @@ namespace SocketsSample
var host = new WebHostBuilder()
.UseConfiguration(config)
.ConfigureLogging(factory =>
{
factory.AddConsole();
})
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()

View File

@ -36,10 +36,8 @@ namespace SocketsSample
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
loggerFactory.AddConsole(LogLevel.Trace);
app.UseFileServer();
if (env.IsDevelopment())

View File

@ -176,8 +176,9 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
private static LoggerFactory CreateLogger()
{
var loggerFactory = new LoggerFactory();
loggerFactory.AddConsole(_verbose ? LogLevel.Trace : LogLevel.Error);
loggerFactory.AddDebug(LogLevel.Trace);
loggerFactory.AddConsole();
loggerFactory.AddFilter("Console", level => level >= (_verbose ? LogLevel.Trace : LogLevel.Error));
loggerFactory.AddDebug();
return loggerFactory;
}

View File

@ -4,6 +4,7 @@
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace WebSocketsTestApp
{
@ -17,6 +18,11 @@ namespace WebSocketsTestApp
var host = new WebHostBuilder()
.UseConfiguration(config)
.ConfigureLogging(factory =>
{
factory.AddConsole();
factory.AddFilter("Console", level => level >= LogLevel.Debug);
})
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()

View File

@ -26,8 +26,6 @@ namespace WebSocketsTestApp
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, PipeFactory PipeFactory)
{
loggerFactory.AddConsole(LogLevel.Debug);
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();