@@ -49,7 +49,7 @@ public class Program
49
49
```csharp
50
50
public static IWebHost BuildWebHost (string [] args ) =>
51
51
WebHost .CreateDefaultBuilder (args )
52
- .UseStartup <Startup >()
52
+ .UseStartup <Startup >()
53
53
.UseSerilog () // <-- Add this line
54
54
.Build ();
55
55
}
@@ -66,12 +66,12 @@ That's it! With the level bumped up a little you will see log output resembling:
66
66
67
67
```
68
68
[22:14:44.646 DBG] RouteCollection.RouteAsync
69
- Routes:
70
- Microsoft.AspNet.Mvc.Routing.AttributeRoute
71
- {controller=Home}/{action=Index}/{id?}
72
- Handled? True
69
+ Routes:
70
+ Microsoft.AspNet.Mvc.Routing.AttributeRoute
71
+ {controller=Home}/{action=Index}/{id?}
72
+ Handled? True
73
73
[22:14:44.647 DBG] RouterMiddleware.Invoke
74
- Handled? True
74
+ Handled? True
75
75
[22:14:45.706 DBG] /lib/jquery/jquery.js not modified
76
76
[22:14:45.706 DBG] /css/site.css not modified
77
77
[22:14:45.741 DBG] Handled. Status code: 304 File: /css/site.css
@@ -162,12 +162,12 @@ Then add a file sink to your `LoggerConfiguration`, taking care to set the `shar
162
162
.MinimumLevel .Override (" Microsoft" , LogEventLevel .Information )
163
163
.Enrich .FromLogContext ()
164
164
.WriteTo .Console ()
165
- // Add this line:
166
- .WriteTo .File (
167
- @" D:\home\LogFiles\Application\myapp.txt" ,
168
- fileSizeLimitBytes : 1_ 000_ 000 ,
169
- rollOnFileSizeLimit : true ,
170
- shared : true ,
171
- flushToDiskInterval : TimeSpan .FromSeconds (1 ))
165
+ // Add this line:
166
+ .WriteTo .File (
167
+ @" D:\home\LogFiles\Application\myapp.txt" ,
168
+ fileSizeLimitBytes : 1_ 000_ 000 ,
169
+ rollOnFileSizeLimit : true ,
170
+ shared : true ,
171
+ flushToDiskInterval : TimeSpan .FromSeconds (1 ))
172
172
.CreateLogger ();
173
173
```
0 commit comments