Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey
Filter by
Sorted by
Tagged with
0 votes
2 answers
105 views

I am having an issue formatting the date in the filename using the appsettings.json file for a C# worker service. My current config looks like this: Serilog": { "WriteTo": [ ...
Nathan's user avatar
  • 21
Best practices
1 vote
1 replies
76 views

I have a CLI app in .NET, built with Spectre.Console.Cli package. I use ServiceCollection with Spectre ITypeResolver and ITypeRegistrar interfaces to wire up the DI. That works great, but now I want ...
roten's user avatar
  • 420
-1 votes
2 answers
101 views

I need to have every invocation from the ILogger interface of a test, but I mock the ILogger interface in the class that is going to be tested, so it won't write to console and therefore the ILogger ...
FlorianD's user avatar
  • 123
1 vote
1 answer
56 views

Working version: private static void SetLogging(WebApplicationBuilder builder) { Log.Logger = new LoggerConfiguration() .Enrich.FromLogContext() .MinimumLevel.Override("...
SydneyShoo's user avatar
1 vote
1 answer
118 views

I've moved my ASP.NET Core 8.0 web application (and API) from Windows to Linux and everything worked great. I changed how the solution was using Nuget packages to centrally manage the versions but ...
tippers's user avatar
  • 61
1 vote
1 answer
164 views

The code snippet below: Log.Logger = new LoggerConfiguration() .Enrich.FromLogContext() .MinimumLevel.Verbose() .WriteTo.Console(outputTemplate: "{Timestamp:HH:mm:ss} [{Level:u3}] {Message}{...
mike's user avatar
  • 3,224
2 votes
0 answers
102 views

I'm using TickerQ in my .NET 9 web project and want to suppress all infrastructure logs (SQL, HTTP requests, etc.) so only my own application logs (and errors) show up. TickerQ Packages: <...
Ash K's user avatar
  • 4,074
1 vote
0 answers
61 views

I've been unable to figure this one out and am wondering if anyone has any ideas. This is an ASP.NET Core Web API running as a Windows service. It will log to a file at the absolute path I specify for ...
Pete's user avatar
  • 33
0 votes
0 answers
105 views

In my ASP.NET Core 8 web app, I am trying to log the messages to Splunk. Splunk shows all the messages in a single message (nested JSON, very difficult to read messages). I want to store only the ...
Terry's user avatar
  • 95
0 votes
1 answer
63 views

I would like writing regular logs to log.csv, statistics info to separate log files. (.NET Framework 4.7.) Instantiated in code - I want to keep it minimal and have purely xml-based config. Log.Logger ...
Nickolodeon's user avatar
  • 2,976
1 vote
2 answers
143 views

I can't find a good example of how to match an EventId in a filter. (Note: I found an outdated solution that looks like Filter.ByIncludingOnly("EventId.Id = 2003"), but this does not work ...
Grant Birchmeier's user avatar
0 votes
0 answers
34 views

I am trying to enable Serilog Tracing (serilog-tracing 2.3.1) in our system. It works well with http communication between our internal processes in my experiments. However, one of our components is ...
bit0001's user avatar
  • 554
0 votes
2 answers
203 views

I'm working on an ASP.NET Core 8 Web API project using Serilog to log to both the console and a file. Everything works perfectly in development (when running locally via Visual Studio), but when I ...
Hady Salah's user avatar
0 votes
1 answer
50 views

I have an ASP.NET Core MVC app using Serilog. Sinks are configured in the appsettings.json. I have a few sinks. One of the sinks is not behaving. Typically I would overwrite the values of the ...
Skip Saillors's user avatar
1 vote
1 answer
74 views

I’m using SEQ for structured logging in my .NET application (Serilog). I want SEQ to display a colored badge (highlight) with the elapsed time (in ms) on the right side of the log message, just like ...
amg63's user avatar
  • 45

15 30 50 per page
1
2 3 4 5
165