social.tchncs.de is one of the many independent Mastodon servers you can use to participate in the fediverse.
A friendly server from Germany – which tends to attract techy people, but welcomes everybody. This is one of the oldest Mastodon instances.

Administered by:

Server stats:

3.8K
active users

#Serilog

0 posts0 participants0 posts today
David Gardiner<p>Blogged: .NET Azure Functions in isolated-worker model, Serilog and App Insights.</p><p><a href="https://david.gardiner.net.au/2025/02/functions-serilog-appinsights.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">david.gardiner.net.au/2025/02/</span><span class="invisible">functions-serilog-appinsights.html</span></a></p><p><a href="https://mastodon.online/tags/AzureFunctions" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>AzureFunctions</span></a> <a href="https://mastodon.online/tags/Serilog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Serilog</span></a> <a href="https://mastodon.online/tags/Logging" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Logging</span></a></p>
bitbonk<p><span class="h-card" translate="no"><a href="https://social.nblumhardt.com/@nblumhardt" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>nblumhardt</span></a></span> I am using Microsoft.Extension.Logging and System.Diagnostics.Activity for logging and <a href="https://mastodon.social/tags/Serilog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Serilog</span></a> just for the sinks. Now I would like to log to <a href="https://mastodon.social/tags/Seq" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Seq</span></a> (`WriteTo.Seq()`) and also enable traces and spans. Is there a place where I can see/learn how to do this?</p>
Scott Galloway<p>Quick blog article, On Logging; just a quick post about choosing logging strageies in different environments (and <br>some discussion on WHY you log differently in different circumstances) <a href="https://www.mostlylucid.net/blog/onlogging" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="">mostlylucid.net/blog/onlogging</span><span class="invisible"></span></a><br><a href="https://hachyderm.io/tags/aspnetcore" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>aspnetcore</span></a> <a href="https://hachyderm.io/tags/serilog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>serilog</span></a></p>
Scott Galloway<p>Today's second blog post. Seq for ASP.NET Logging - Tracing with SerilogTracing<br><a href="https://www.mostlylucid.net/blog/selfhostingseqpt2" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">mostlylucid.net/blog/selfhosti</span><span class="invisible">ngseqpt2</span></a><br><a href="https://hachyderm.io/tags/seq" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>seq</span></a> <a href="https://hachyderm.io/tags/serilog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>serilog</span></a> <a href="https://hachyderm.io/tags/aspnetcore" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>aspnetcore</span></a></p>
Jake Carpenter<p>My org has some <a href="https://hachyderm.io/tags/dotnet" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dotnet</span></a> logging going to a "not quite ELK" Elasticsearch logging stack. We use <a href="https://hachyderm.io/tags/Serilog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Serilog</span></a>, 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.</p><p>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.</p><p><a href="https://github.com/jake-carpenter/serilog-elastic" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/jake-carpenter/seri</span><span class="invisible">log-elastic</span></a></p>
Anthony Steele<p><span class="h-card" translate="no"><a href="https://social.nblumhardt.com/@nblumhardt" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>nblumhardt</span></a></span> <span class="h-card" translate="no"><a href="https://hachyderm.io/@ICooper" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>ICooper</span></a></span> </p><p>TBH, going from <a href="https://dotnet.social/tags/dotnet" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dotnet</span></a> <a href="https://dotnet.social/tags/serilog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>serilog</span></a> with Serilog.Exceptions to OTEL felt like step a backwards in one respect: recording structured exceptions. </p><p>.NET exceptions are structured data: public fields have names and typed value, and can be recorded as such. </p><p>.NET typed exceptions have custom data: Put the orderId in the orderId prop, not in message text.</p><p>.NET exceptions are recursively structured due to inner ex.<br> <br>Embracing this in telemetry leads to better exception design</p>
l4p1n<p>So I've done some C# [<a href="https://furry.engineer/tags/csharp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>csharp</span></a>] today. I tried reproducing some things I really liked in the `tracing` crate in Rust:</p><p>- The module path to the function (the call site or something ?)<br>- Inline parameters as context</p><p>I tried <a href="https://furry.engineer/tags/NLog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NLog</span></a>. It works very well, but getting the call site was either performance expensive or I had to do a dance when logging stuff.</p><p>I checked out <a href="https://furry.engineer/tags/Serilog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Serilog</span></a>, I haven't found something where the class logging the message would be written.</p><p>I tried <a href="https://furry.engineer/tags/log4net" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>log4net</span></a>. 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.</p><p>Do you have any <a href="https://furry.engineer/tags/logging" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>logging</span></a> libs I should checkout or some examples on paw ?</p>
Sean Killeen<p>New blog post: "How To: Test Logging When Using Microsoft.Extensions.Logging and Serilog"</p><p><a href="https://seankilleen.com/2024/04/how-to-test-logging-when-using-microsoft-extensions-logging-and-serilog/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">seankilleen.com/2024/04/how-to</span><span class="invisible">-test-logging-when-using-microsoft-extensions-logging-and-serilog/</span></a></p><p><a href="https://mastodon.social/tags/dotnet" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dotnet</span></a> <a href="https://mastodon.social/tags/testing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>testing</span></a> <a href="https://mastodon.social/tags/serilog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>serilog</span></a></p>
bitbonk<p><span class="h-card" translate="no"><a href="https://social.nblumhardt.com/@nblumhardt" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>nblumhardt</span></a></span> So in general for redaction, the suggested approach is I write my own custom redacting sink?<br>Would it be worth to put all the redaction functionality into a reusable <a href="https://mastodon.social/tags/serilog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>serilog</span></a> <a href="https://mastodon.social/tags/nuget" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>nuget</span></a> package?</p>
Nicholas Blumhardt<p>Aiming for a more complete <a href="https://social.nblumhardt.com/tags/serilog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>serilog</span></a> redaction example than otherwise exists out there; spot anything that I've missed? 🙏 <a href="https://github.com/nblumhardt/serilog-redaction" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/nblumhardt/serilog-</span><span class="invisible">redaction</span></a></p>
bitbonk<p><span class="h-card" translate="no"><a href="https://social.nblumhardt.com/@nblumhardt" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>nblumhardt</span></a></span> We have a type that does not override `ToString()`. But we *always* want it to be serialized as a specific string in <a href="https://mastodon.social/tags/Serilog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Serilog</span></a>. Does Serilog have means to achieve that?<br>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. <a href="https://mastodon.social/tags/dotnet" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dotnet</span></a></p>
Chief Posh ☑<p>Hey <a href="https://dotnet.social/tags/dotnet" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dotnet</span></a> <a href="https://dotnet.social/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> s,<br>heard of <a href="https://dotnet.social/tags/Serilog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Serilog</span></a> ?</p><p>If not, time to look into it!</p><p>Great Video by Milan Jovanović (does someone know his mastodon address?)</p><p><a href="https://www.youtube.com/watch?v=w7yDuoCLVvQ" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">youtube.com/watch?v=w7yDuoCLVv</span><span class="invisible">Q</span></a></p><p><a href="https://dotnet.social/tags/GLHF" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>GLHF</span></a></p><p><a href="https://dotnet.social/tags/seesharp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>seesharp</span></a> <a href="https://dotnet.social/tags/csharp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>csharp</span></a> <a href="https://dotnet.social/tags/logging" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>logging</span></a> <a href="https://dotnet.social/tags/youtube" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>youtube</span></a></p>

Оказывается логгирование это не так просто. Serilog пли использовании строк с параметрами хранит шаблон интернированной строки, а при использовании интерполяции каждая строка уникальная и гадит в кэш. Отрывок из доклада Евгения Пешкова youtube.com/watch?v=0V9Rr8WndL
#serilog #dotnet #logging #codefest