1
1
// Copyright (c) .NET Foundation. All rights reserved.
2
2
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3
3
4
- using System ;
5
4
using System . Collections . Generic ;
6
- using System . Diagnostics ;
7
5
using System . IO ;
8
6
using System . Linq ;
9
- using System . Threading ;
10
7
using Microsoft . AspNetCore . Hosting ;
11
8
using Microsoft . Extensions . Configuration ;
12
9
using Microsoft . Extensions . Hosting ;
10
+ using Microsoft . Extensions . Logging ;
13
11
14
12
namespace Microsoft . AspNetCore . Blazor . DevServer . Server
15
13
{
@@ -27,7 +25,8 @@ public class Program
27
25
/// </summary>
28
26
public static IHost BuildWebHost ( string [ ] args ) =>
29
27
Host . CreateDefaultBuilder ( args )
30
- . ConfigureHostConfiguration ( cb => {
28
+ . ConfigureHostConfiguration ( cb =>
29
+ {
31
30
var applicationPath = args . SkipWhile ( a => a != "--applicationpath" ) . Skip ( 1 ) . FirstOrDefault ( ) ;
32
31
var name = Path . ChangeExtension ( applicationPath , ".StaticWebAssets.xml" ) ;
33
32
@@ -39,6 +38,11 @@ public static IHost BuildWebHost(string[] args) =>
39
38
} ) ;
40
39
}
41
40
} )
41
+ . ConfigureLogging ( logging =>
42
+ {
43
+ logging . SetMinimumLevel ( LogLevel . Warning ) ;
44
+ logging . AddFilter ( "Microsoft.Hosting.Lifetime" , LogLevel . Information ) ;
45
+ } )
42
46
. ConfigureWebHostDefaults ( webBuilder =>
43
47
{
44
48
webBuilder . UseStaticWebAssets ( ) ;
0 commit comments