@@ -11,7 +11,7 @@ This package routes ASP.NET log messages through Serilog, so you can get informa
11
11
12
12
``` powershell
13
13
Install-Package Serilog.Extensions.Logging -DependencyVersion Highest
14
- Install-Package Serilog.Sinks.Literate
14
+ Install-Package Serilog.Sinks.Console
15
15
```
16
16
17
17
** Next** , in your application's ` Startup ` method, configure Serilog first:
@@ -25,7 +25,7 @@ public class Startup
25
25
{
26
26
Log .Logger = new LoggerConfiguration ()
27
27
.Enrich .FromLogContext ()
28
- .WriteTo .LiterateConsole ()
28
+ .WriteTo .Console ()
29
29
.CreateLogger ();
30
30
31
31
// Other startup code
@@ -47,16 +47,16 @@ call `AddSerilog()` on the provided `loggerFactory`.
47
47
That 's it! With the level bumped up a little you should see log output like:
48
48
49
49
```
50
- 2015 - 05 - 15 22 : 14 : 44 . 646 + 10 : 00 [ DBG ] RouteCollection .RouteAsync
50
+ [ 22 : 14 : 44 . 646 DBG ] RouteCollection .RouteAsync
51
51
Routes :
52
52
Microsoft .AspNet .Mvc .Routing .AttributeRoute
53
53
{controller = Home }/ {action = Index }/ {id ? }
54
54
Handled ? True
55
- 2015 - 05 - 15 22 : 14 : 44 . 647 + 10 : 00 [ DBG ] RouterMiddleware .Invoke
55
+ [ 22 : 14 : 44 . 647 DBG ] RouterMiddleware .Invoke
56
56
Handled ? True
57
- 2015 - 05 - 15 22 : 14 : 45 . 706 + 10 : 00 [ DBG ] / lib / jquery / jquery .js not modified
58
- 2015 - 05 - 15 22 : 14 : 45 . 706 + 10 : 00 [ DBG ] / css / site .css not modified
59
- 2015 - 05 - 15 22 : 14 : 45 . 741 + 10 : 00 [ DBG ] Handled . Status code : 304 File : / css / site .css
57
+ [ 22 : 14 : 45 . 706 DBG ] / lib / jquery / jquery .js not modified
58
+ [ 22 : 14 : 45 . 706 DBG ] / css / site .css not modified
59
+ [ 22 : 14 : 45 . 741 DBG ] Handled . Status code : 304 File : / css / site .css
60
60
```
61
61
62
62
### Credits
0 commit comments