Structured Logging Using Serilog and Seq in .NET

preview_player
Показать описание

Structured logging is a practice where you apply the same format to all your log messages. All logs will follow a similar structure, allowing them to be treated like data sets. Seq is a structured logging server that can store your application logs. You can then use Seq to search and analyze your logs in real time.

Join my weekly .NET newsletter:

Read my Blog here:

Chapters
0:00 What is Seq?
1:06 Installing Serilog and the Seq sink
2:23 Adding Seq image to Docker compose
3:37 Defining the Serilog JSON configuration
6:19 Seq dashboard and filtering structured logs
8:50 Expanding the structured log data
11:00 Seq monitoring dashboard
11:28 Serilog requesting logging
Рекомендации по теме
Комментарии
Автор

this is very useful to visualize all the list of error logs in my application in a neat dashboard view in both production and development phase

amirfahd
Автор

Do you use SEQ in your production products? Nice little video to get to know SEQ a bit, nice sharing!

nove
Автор

Nice video. Would be interested in Elastic search video

antonmartyniuk
Автор

Finally got to watch this. This was a really great and helpful video, liked it a lot. I will definitely try this out!

majormartintibor
Автор

Excellent Milan. This is helpful.Thanks

lalitap-eimc
Автор

Hi, I love your videos, you always learn something new.
I would like to suggest doing one about opentelemetry, using otlp, sending metrics to Prometheus, logs to Grafana Loki and visualization in Grafana.

to be able to change the vendor whenever we want

ArchThiagoDeOliveira
Автор

Excellent explanation, I am using serilog with ELK but definitely i will try Seq. Thanks for great content @milan

kumarshambhoo
Автор

Could you make a video to share your experience about how to write enough log?

nucasspro
Автор

Nice video, Milan. Could you guide me to set up my visual studio looks like yours ?

PhuongHoHoang-wnju
Автор

Hey, can you tell me how you got this beautiful colors in your IDE for methods and properties etc..? Would apprecatiate that <3

feinirl
Автор

I find the licensing terms of Seq very ambiguous. It says I can run it as a single user for free on a developer workstation. Elsewhere in the github discussion they state that seq license doesn't discriminate between production or non-production, so long as it is single user. But it's unlikely any production instance would use a developer workstation, it would be installed in a container or otherwise to a server, even if there is only one person using it. The pricing page doesn't seem to address that scenario and I find conflicting interpretations of it elsewhere. That gives me pause about trying this, though I'm still curious about it as I'm already using serilog with file sink in my application.

kdavis
Автор

Is the project you use in this demo publicly available?

AntonyMeyn
Автор

I've viewed many videos regarding logging, opentelemetry and more. But I have one scenario where I am not sure what I should use.

Pretend a specific user is making a request, the request is coming and going through many Middlewares, functions and more. If in the middle any exception happens I need to return a unique ID to him, by that Id I need to find the whole path the user request is going through, and the data changed and the exception occurred. Cause sometimes I have a specific user which cause an exception on live. But I don't have the logging which enables me track his whole request path. Is this possible, if yes then how? Please just give me a name of the tech, or the way, then I will search and find the how's myself. Thanks in advance.

AbuBakrSadiqi-bt
Автор

Hi, Thank you so much for this. I really needed this.
How can I map the instance of seq to the config using the Env Variable? I mean, I want to map the serverURL via an environment Variable instead of conatinaer name?

segdavids
Автор

How to I host my seq community version on a web hosting environment or on the cloud like azure

ugochukwuumerie
Автор

hey, Milan!
how would you prevent secret information like user passwords from leaking into the logs? what's your approach? thanks!

lettuceturnipthebeets
Автор

When you add the Serilog Request Logging Middleware, you then show the logs in SEQ, but they are not the ones that come from the middleware, those ones should have a SourceContext of not

stevehiggin
Автор

Thanks So much
i want ask u about code Themes Please ?

ShekoAngelHearts
Автор

I would show average db-query time as example what you can do ;)

elpe
Автор

Still work on .net8?, I tried but failed

lesterjohneguaras