Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
54 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,966
1 vote
1 answer
147 views

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 $ ...
SoftHuman's user avatar
2 votes
2 answers
668 views

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 ...
Dura's user avatar
  • 83
0 votes
1 answer
134 views

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....
Nitin Jain's user avatar
1 vote
0 answers
91 views

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 ...
Jai dewani's user avatar
0 votes
1 answer
167 views

Here is the config { "Serilog": { "WriteTo": [ { "Name": "File", "Args": { "path": "log.txt&...
just_code_dog's user avatar
0 votes
1 answer
917 views

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 ...
Stefania's user avatar
1 vote
0 answers
194 views

My team and I attempt to integrate auditing capability of serilog-sinks-file for our application. We have the requirement to report failures in auditing mechanism. Therefore I try better understand ...
user avatar
0 votes
1 answer
826 views

I'm trying to split logs by SourceContext. After spending some days and reading the documentation and many, many, many posts, I have this config and not a solution: "Serilog": { "...
Glauco Cucchiar's user avatar
2 votes
0 answers
739 views

I use the serilog-sinks-file package to copy the logs into a ".log" file but it does not generate the directory or the file. I added this code in "MauiProgram.cs" inside a empty ...
Victor PM's user avatar
0 votes
1 answer
145 views

I have a WPF application and want to use Serilog to log context in a local txt file. I have installed Serilog, Serilog.Sinks.File and Serilog.Settings.AppSettings packages. After launching and ...
AoLiGei's user avatar
  • 81
2 votes
3 answers
4k views

I want to print log to file from my system (.NET Framework 4.6.1) I want to print this information: className, methodName, lineNumber from which log entry was Called. I've a Serilog class: ` ...
Miriam F.'s user avatar
0 votes
2 answers
486 views

I'm running a workservice as a window service, the log to eventlog is working, but it's not logging to file. When ran in visual studio, it logs to both eventlog and to file. What could explain this? ...
Lee's user avatar
  • 783
1 vote
2 answers
1k views

I was trying to clear log files periodically. So, while searching in serilog.sink.file v5.0.0 I found out a something called retainedFileTimeLimit and I tried it but it didn't work. This is my code -&...
Jawoy's user avatar
  • 53
2 votes
0 answers
355 views

I need to have a single dedicated log file for each execution of an application - which may occur many times a day. I set a different name to the log file on each execution by adding timestamp by code....
Yosi Maurer's user avatar
0 votes
1 answer
189 views

The dilemma: I've added logging to an existing console application for work that is executed every 5 minutes via a sql job. The logging has worked in development, testing, and production when I ...
Jesslyn's user avatar
  • 706
1 vote
1 answer
2k views

We are using Serilog file sink and Elastic search sink that both use a Serilog async sink to make sure everything is handled in a background thread. The last days we had server-wide issues and all ...
AardVark71's user avatar
  • 4,104
0 votes
1 answer
255 views

Hi i am using serilog to write the log. Log captured perfectly, my problem with the log filename. I have configured log filename as trace.log. once the file limit is reached the latest log captured in ...
Natchatra's user avatar
0 votes
0 answers
1k views

I have very big solution that use ILogger<T> with serilog for each class, all of them write logs to same file with shared : true. the problem is retainedFileCountLimit doesn’t work for me ...
Aviv Nevelev's user avatar
3 votes
1 answer
3k views

I am using Serilog.Sinks.File in .NET Core 5 and it is working fine. In .NET Core 5, I am using the subsequent configuration, startup.cs public void Configure(IApplicationBuilder app, ...
Gurpreet Kailey's user avatar
1 vote
1 answer
621 views

I add FileSink as failureSink to ElasticsearchSink from appSettings.json. But "Cannot create instance of type 'Serilog.Core.ILogEventSink' because it is either abstract or an interface." I ...
rdmzcn's user avatar
  • 161
2 votes
1 answer
3k views

I am using SeriLog in my .Net6 application. I am trying to create a serilog json configuration that will help me create a new log folder each day. Then the logs for that day will be created in the ...
Hari Sankar v m's user avatar
1 vote
0 answers
220 views

I'm trying to log my events in two different files based on the global minimum level set in the logger: >= Debug to a debug file >= Information to another file. I control the minimum level ...
Sirosimo's user avatar
2 votes
1 answer
853 views

I am logging the data like below : .WriteTo.File("log.txt", rollOnFileSizeLimit: true,retainedFileCountLimit: 1, fileSizeLimitBytes: 10) This ...
tesrer's user avatar
  • 51
0 votes
1 answer
861 views

I'm trying to show request and response in logs using Serilog in .Net Core MVC 6. But also I need to show the user's informations. How can I show it I've never used logging before? Program.cs var ...
user avatar