Skip to content

Commit f01059b

Browse files
committed
Make the dev-server log less
1 parent c387656 commit f01059b

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030

3131
<ItemGroup>
3232
<NuspecProperty Include="publishDir=$(PublishDir)" />
33-
<NuspecProperty Include="componentsrootdir=..\..\..\" />
34-
<NuspecProperty Include="blazorversion=$(PackageVersion)" />
3533
</ItemGroup>
3634

3735
</Project>

src/Components/Blazor/DevServer/src/Server/Program.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
using System;
54
using System.Collections.Generic;
6-
using System.Diagnostics;
75
using System.IO;
86
using System.Linq;
9-
using System.Threading;
107
using Microsoft.AspNetCore.Hosting;
118
using Microsoft.Extensions.Configuration;
129
using Microsoft.Extensions.Hosting;
10+
using Microsoft.Extensions.Logging;
1311

1412
namespace Microsoft.AspNetCore.Blazor.DevServer.Server
1513
{
@@ -27,7 +25,8 @@ public class Program
2725
/// </summary>
2826
public static IHost BuildWebHost(string[] args) =>
2927
Host.CreateDefaultBuilder(args)
30-
.ConfigureHostConfiguration(cb => {
28+
.ConfigureHostConfiguration(cb =>
29+
{
3130
var applicationPath = args.SkipWhile(a => a != "--applicationpath").Skip(1).FirstOrDefault();
3231
var name = Path.ChangeExtension(applicationPath,".StaticWebAssets.xml");
3332

@@ -39,6 +38,11 @@ public static IHost BuildWebHost(string[] args) =>
3938
});
4039
}
4140
})
41+
.ConfigureLogging(logging =>
42+
{
43+
logging.SetMinimumLevel(LogLevel.Warning);
44+
logging.AddFilter("Microsoft.Hosting.Lifetime", LogLevel.Information);
45+
})
4246
.ConfigureWebHostDefaults(webBuilder =>
4347
{
4448
webBuilder.UseStaticWebAssets();

0 commit comments

Comments
 (0)