103 questions
0 votes
2 answers
74 views
Serilog Date Format using appsettings.json
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": [ ...
0 votes
1 answer
62 views
Serilog xml-based config sublogger not working
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 ...
0 votes
0 answers
57 views
Serilog with file sink not flushing to file in MAUI app
I have a .NET9 Maui Android / iOS App using Serilog with file sink. Log file is created but is empty (0bytes) and logs are written ONLY if i close the app. I want the log file to be filled constantly ...
1 vote
1 answer
157 views
Does Serilog support WinUI 3.0 Apps?
I am new to WinUI development, I created a new simple WinUI 3.0 app (using Viusal Studio template Blank App, Packaged (WinUI 3 in desktop) I also installed the following $ dotnet add package Serilog $ ...
0 votes
0 answers
77 views
Serilog with Filter expression
I am updating my legacy app to use Serilog. It is an ASP.NET webforms app, written in C# and running on .NET 4.8. The idea is: There are total 3 sinks will be configured... File, Event and DB By ...
2 votes
2 answers
689 views
Serilog Seq and file Sink not working in maui (net9)
I want to use Serilog with file- and seq-sink in a .NET9 Maui app but both are not working. I already used it in an asp.net core web api project and it worked fine, so i tried to implement it in a ...
1 vote
1 answer
474 views
How to format log with Serilog.Sinks.Seq
I'm new to both Serilog and Seq, and I'm trying to format the logs injested in Seq in a specific way. I've configured two sinks, one for the console and one for seq, in my appsettings file. For my ...
0 votes
1 answer
139 views
Logs are missing in .NET Core 3.1 Console Application using Serilog.Sinks.Async
In my .NET Core 3.1 console application, I am reading a large text file with records sequentially and logging the record number and other information using the below Serilog sinks: "Serilog.Sinks....
1 vote
1 answer
525 views
How to configure output template for JSON Formatter in Serilog .NET
I have added configuration for logging in JSON file using Serilog. Default generated file has lot of properties, I want to customize that. { "@t": "2024-09-06T06:34:39.4252863Z"...
1 vote
0 answers
95 views
Three ASP.NET Core Web API not able to share and write to the same file sink using Serilog
I have three ASP.NET Core Web APIs hosted in IIS on the same machine which use different configuration file to setup Serilog but all of them point to the same log file. Here is an example of my ...
0 votes
0 answers
111 views
How to store different types of logs in different files in Serilog .NET 8
I want to store logs in different file based on type. Let's say for for API Request log - request-.txt; EF Core Query - log-.txt I have installed Serilog packages, and it works fine but file ...
0 votes
1 answer
175 views
Why Serilog file suddenly doesn't write to file when reached 1000kb?
Here is the config { "Serilog": { "WriteTo": [ { "Name": "File", "Args": { "path": "log.txt&...
1 vote
2 answers
137 views
Serilog format context property as top level property
I'm adding properties to the log using LogContext.PushProperty() but the properties end up as properties of "Properties" like this: { "Timestamp":"2024-08-28T15:19:48....
0 votes
1 answer
934 views
Serilog Sink File with Filter not worked using the appsettings.json
WEB API, .NET CORE, C#, NET 8.0, SERILOG, SINK FILE, SERILOG EXPRESSIONS Good morning, as per demo attached here (https://github.com/serilog/serilog-sinks-file/issues/317) I have some problem to write ...
2 votes
1 answer
463 views
How to configure Serilog to keep the most recent log without a numeric suffix when using file rolling?
I'm using Serilog's file sink for logging in a .NET 8 application. I have configured the file sink to roll over when the file size limit is reached, but the naming convention is problematic for my use ...