File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
## [ Unreleased]
8
8
### Add
9
9
- Link interception for image links
10
+ - Option activate/deactivate logging of the host
10
11
11
12
## [ 0.5.4] - 2020-04-29
12
13
### Add
Original file line number Diff line number Diff line change 8
8
using Microsoft . AspNetCore . Hosting . Server . Features ;
9
9
using Microsoft . Extensions . DependencyInjection ;
10
10
using Microsoft . Extensions . FileProviders ;
11
+ using Microsoft . Extensions . Logging ;
11
12
12
13
namespace SharpWebview . Content
13
14
{
14
15
public sealed class HostedContent : IWebviewContent
15
16
{
16
17
private readonly IWebHost _webHost ;
17
18
18
- public HostedContent ( int port = 0 )
19
+ public HostedContent ( int port = 0 , bool activateLog = false )
19
20
{
20
21
_webHost = WebHost . CreateDefaultBuilder ( )
21
22
. UseStartup < Startup > ( )
22
23
. UseKestrel ( options => options . Listen ( IPAddress . Loopback , port ) )
24
+ . ConfigureLogging ( ( logger ) => { if ( ! activateLog ) logger . ClearProviders ( ) ; } )
23
25
. Build ( ) ;
24
26
_webHost . Start ( ) ;
25
27
}
You can’t perform that action at this time.
0 commit comments