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
2929 try
3030 {
3131 Log .Information (" Starting web host" );
32- BuildWebHost (args ).Run ();
32+ CreateWebHostBuilder (args ). Build ( ).Run ();
3333 return 0 ;
3434 }
3535 catch (Exception ex )
@@ -46,12 +46,11 @@ public class Program
4646
4747**Then**, add `UseSerilog ()` to the web host builder in `BuildWebHost ()`.
4848
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;
5554 }
5655```
5756
You can’t perform that action at this time.
0 commit comments