#serilog

2025-12-12

Логирование с Serilog: как повысить отказоустойчивость и скорость

Когда логов становится слишком много, а сеть или облачный приёмник начинает тормозить, даже самый надёжный логгер может превратиться в источник проблем. Наша команда столкнулась с тем, что память забивалась логами, и это приводило к OutOfMemoryException и аварийному закрытию приложений. В статье разбираю, как устроен процесс логирования в Serilog, почему асинхронная отправка логов не всегда безопасна, как протестировать систему на устойчивость к задержкам и какие настройки и архитектурные приёмы помогут сохранить стабильность под нагрузкой.

habr.com/ru/articles/972118/

#serilog #altenar #c# #net #логирование #spbdotnet

bitbonkbitbonk
2025-07-01

@nblumhardt Look, learned a new trick and it works pretty well with
I wish there would be a similar @seq plugin for Rider that would just spin up a local dev Seq instance for me and sow the logs directly in the IDE.

github.com/bitbonk/OTELSerilog

2025-03-14

Milan Jovanović with a simple and effective way to add additional context to OpenTelemetry request tracing milanjovanovic.tech/blog/bette #dotnet #aspnet #otel #serilog

2025-02-10

Blogged: .NET Azure Functions in isolated-worker model, Serilog and App Insights.

david.gardiner.net.au/2025/02/

#AzureFunctions #Serilog #Logging

bitbonkbitbonk
2024-11-21

@nblumhardt I am using Microsoft.Extension.Logging and System.Diagnostics.Activity for logging and just for the sinks. Now I would like to log to (`WriteTo.Seq()`) and also enable traces and spans. Is there a place where I can see/learn how to do this?

Scott Gallowayscottgal@hachyderm.io
2024-10-27

Quick blog article, On Logging; just a quick post about choosing logging strageies in different environments (and
some discussion on WHY you log differently in different circumstances) mostlylucid.net/blog/onlogging
#aspnetcore #serilog

Nicholas Blumhardtnblumhardt@nblumhardt.com
2024-10-03

Following yesterday's write-up of #Serilog 4.1 fallback sinks, here's a tiny test harness you can use to explore the new batch retry algorithm, along with an example run: nblumhardt.com/2024/10/retry-t

Screenshot of terminal output from the batch retry test harness that's included in the linked blog post. The first line shows a network batch succeeding, followed by three lines for failed batches, followed by five events reaching the local fallback sink, and so on.
Nicholas Blumhardtnblumhardt@nblumhardt.com
2024-10-03

Serilog fallback sinks and failure listeners: nblumhardt.com/2024/10/fallbac #serilog

Scott Gallowayscottgal@hachyderm.io
2024-08-31

Today's second blog post. Seq for ASP.NET Logging - Tracing with SerilogTracing
mostlylucid.net/blog/selfhosti
#seq #serilog #aspnetcore

2024-08-22

My org has some #dotnet logging going to a "not quite ELK" Elasticsearch logging stack. We use #Serilog, but we're still on ES 7.17.x which means we're stuck between deprecated index templates and the newer composable ones that don't work with the ES Serilog sink.

I've always struggled with getting the lifecycles set up correctly for rollover, so I set up a demo project to radically speed up the feedback cycle from weeks to minutes. Hope this helps someone else.

github.com/jake-carpenter/seri

2024-08-22

@nblumhardt @ICooper

TBH, going from #dotnet #serilog with Serilog.Exceptions to OTEL felt like step a backwards in one respect: recording structured exceptions.

.NET exceptions are structured data: public fields have names and typed value, and can be recorded as such.

.NET typed exceptions have custom data: Put the orderId in the orderId prop, not in message text.

.NET exceptions are recursively structured due to inner ex.

Embracing this in telemetry leads to better exception design

Nicholas Blumhardtnblumhardt@nblumhardt.com
2024-05-02

Building async batching directly into #Serilog.

Wrangling System.Threading.Channels to implement an async try-read-with-timeout got gnarly! 😅

github.com/serilog/serilog/pul

2024-04-27

So I've done some C# [#csharp] today. I tried reproducing some things I really liked in the `tracing` crate in Rust:

- The module path to the function (the call site or something ?)
- Inline parameters as context

I tried #NLog. It works very well, but getting the call site was either performance expensive or I had to do a dance when logging stuff.

I checked out #Serilog, I haven't found something where the class logging the message would be written.

I tried #log4net. The doc is a bit lackluster (where the fsck is the API doc !?) but I was able to log the module calling the log function. Haven't tried with properties yet.

Do you have any #logging libs I should checkout or some examples on paw ?

Sean Killeensjkilleen
2024-04-09

New blog post: "How To: Test Logging When Using Microsoft.Extensions.Logging and Serilog"

seankilleen.com/2024/04/how-to

bitbonkbitbonk
2024-04-04

@nblumhardt So in general for redaction, the suggested approach is I write my own custom redacting sink?
Would it be worth to put all the redaction functionality into a reusable package?

Das nächste .NET User Group Meetup steht an, wie immer um 19:00 in der Postgarage in Dornbirn. Dieses mal mit dem Thema "Centralized logging with serilog and seq" von Raphael Kuster! Anmeldung: zurl.co/p6mw #dotnetdev #serilog #dornbirn #vorarlberg #dotnetrheintal

Nicholas Blumhardtnblumhardt@nblumhardt.com
2024-02-26

Aiming for a more complete #serilog redaction example than otherwise exists out there; spot anything that I've missed? 🙏 github.com/nblumhardt/serilog-

bitbonkbitbonk
2024-02-07

@nblumhardt We have a type that does not override `ToString()`. But we *always* want it to be serialized as a specific string in . Does Serilog have means to achieve that?
I know about `Destructure.ByTransforming` but that will require the `@` operator in the log template, which is easy to forget. We would prefer that it is not required for that type.

Chief Posh ☑xeo@dotnet.social
2024-01-20

Hey #dotnet #dev s,
heard of #Serilog ?

If not, time to look into it!

Great Video by Milan Jovanović (does someone know his mastodon address?)

youtube.com/watch?v=w7yDuoCLVv

#GLHF

#seesharp #csharp #logging #youtube

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst