Skip to content

Commit cfbc06f

Browse files
authored
Update README.md
1 parent f148adb commit cfbc06f

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

README.md

+28-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,28 @@
1-
# generate-log-using-serilog-and-seq-in-asp-net-core-mvc6
2-
Serilog is a structured logging system that creates log messages and captures key attributes and data about the message's context. Serilog generates log messages as data, not just plain text. You can efficiently perform structured queries on these messages.
1+
2+
# Generate Log using Serilog And Seq In ASP.NET Core MVC 6
3+
4+
This blog explains how to generate logs using Serilog, its feature like Sink, log level, JSONFormatter, Serilog Enricher, Output Templates, and analyze using Seq.
5+
6+
Serilog is a structured logging system that creates log messages and captures key attributes and data about the message's context.
7+
Serilog generates log messages as data, not just plain text. You can efficiently perform structured queries on these messages.
8+
9+
10+
```
11+
var _logger = new LoggerConfiguration()
12+
.WriteTo.File("./logs/log-.txt",
13+
rollingInterval: RollingInterval.Day)
14+
.WriteTo.Seq("http://localhost:5341",
15+
Serilog.Events.LogEventLevel.Warning)
16+
.MinimumLevel.Debug()
17+
.CreateLogger();
18+
19+
builder.Logging.AddSerilog(_logger);
20+
var app = builder.Build();
21+
22+
```
23+
24+
Seq
25+
26+
![ASP.NET Core Serilog Seq](https://geeksarray.com/images/blog/serilog-seq.png)
27+
28+
For more details [Generate Log using Serilog And Seq In ASP.NET Core MVC 6](https://geeksarray.com/blog/generate-log-using-serilog-and-seq-in-asp-net-core-mvc6)

0 commit comments

Comments
 (0)