File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public class Program
29
29
try
30
30
{
31
31
Log .Information (" Starting web host" );
32
- BuildWebHost (args ).Run ();
32
+ CreateWebHostBuilder (args ). Build ( ).Run ();
33
33
return 0 ;
34
34
}
35
35
catch (Exception ex )
@@ -46,12 +46,11 @@ public class Program
46
46
47
47
**Then**, add `UseSerilog ()` to the web host builder in `BuildWebHost ()`.
48
48
49
- ```csharp
50
- public static IWebHost BuildWebHost (string [] args ) =>
51
- WebHost .CreateDefaultBuilder (args )
52
- .UseStartup <Startup >()
53
- .UseSerilog () // <-- Add this line
54
- .Build ();
49
+ ```csharp
50
+ public static IWebHostBuilder CreateWebHostBuilder (string [] args ) =>
51
+ WebHost .CreateDefaultBuilder (args )
52
+ .UseStartup <Startup >()
53
+ .UseSerilog (); // <-- Add this line;
55
54
}
56
55
```
57
56
You can’t perform that action at this time.
0 commit comments