Skip to main content
Filter by
Sorted by
Tagged with
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
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
1 vote
0 answers
77 views

In my ASP.NET Core web application, I use Serilog to save all the logs in SQL Server. After that, I see a lot of messages like that: Ending HttpMessageHandler cleanup cycle after 0.0046ms - processed: ...
Enrico's user avatar
  • 6,902
1 vote
1 answer
54 views

Currently I can truncate Serilog to specific length using following Enricher Class: public class WithTrimmedMessage(int maxLength) : ILogEventEnricher { public void Enrich(LogEvent logEvent, ...
JazzyHacker's user avatar
1 vote
0 answers
47 views

I'm using Serilog.AspNetCore v9.0.0. I can display {EventId} in the logging output format and displayed as follow: { Id: 14, Name: "ListeningOnAddress" } But it will display empty string if ...
JazzyHacker's user avatar
1 vote
0 answers
45 views

What is the most efficient way of logging the shortened versions of the ActionName and SourceContext properties using Serilog.AspNetCore in an ASP.NET Core app? For the SourceContent, I'd like to ...
Alek Davis's user avatar
  • 10.8k
1 vote
0 answers
252 views

In my ASP.NET Core 8.0 Web API, I ran into an runtime issue with Serilog and DiagnosticContext. My previously working config is as follows: public static WebApplicationBuilder AddLogging(this ...
Chaos's user avatar
  • 139
0 votes
1 answer
114 views

I've been trying to find how to filter logs/traces of different levels to specific destinations. A destination and filter rule would be Write everything to stdout (For viewing in logs in container ...
joacar's user avatar
  • 961
3 votes
1 answer
205 views

I have a Blazor Server app being hosted in a Azure App Service and want to customize the logging. I’m trying Serilog for the first time and after watching a couple videos I as able to get it to at ...
Caverman's user avatar
  • 3,859
1 vote
0 answers
156 views

I'm working on a ASP.NET Core MVC application and would like to use Serilog both for logging trace messages (Information) and Exceptions to Application Insight. The configuration code (from Program....
user29807957's user avatar
0 votes
2 answers
130 views

I'm working on an ASP.NET application and using Azure AppInsights and Serilog Sink https://github.com/serilog-contrib/serilog-sinks-applicationinsights for pushing the logs. However one problem I have ...
Yehia A.Salam's user avatar
1 vote
1 answer
422 views

I am currently using a centralized configuration for OpenTelemetry logging. This configuration is then called at startup from every single service directly in Program.cs With this configuration I am ...
Mammt's user avatar
  • 67
3 votes
1 answer
2k views

I want to see my ASP.NET Core application's logs in Application Insights. I'm using the following packages: Azure.Monitor.OpenTelemetry.AspNetCore Serilog.AspNetCore Serilog.Sinks.OpenTelemetry This ...
mrk's user avatar
  • 131
0 votes
1 answer
274 views

I have a .NET 8 Blazor WASM web application. I am trying to implement Serilog to push logs back to my API Server application. I saw this thread: Use serilog as logging provider in blazor webassembly ...
Airn5475's user avatar
  • 2,500
0 votes
1 answer
757 views

I want to use healthchecks and Serilog (with request logging), but I get a flood of useless log events, as well as ones for the failure cases. The v8 docs (and this) show there are differences between ...
lonix's user avatar
  • 22.5k
3 votes
1 answer
442 views

There are two ways to register Serilog. The "old" way (shown in countless SO questions and tutorials): //builder.Logging.ClearProviders(); // optional builder.Logging.AddSerilog(); And ...
lonix's user avatar
  • 22.5k
0 votes
1 answer
102 views

Using Serilog, I want to have a new property Identifier (right after "Timestamp") in the log file like below: {"Timestamp":"2019-10-11T12:18:51.1488404+08:00", "...
Yeasin Abedin's user avatar
1 vote
1 answer
181 views

The Serilog async sink has a health monitoring feature, where one must implement IAsyncLogEventSinkMonitor to monitor when the buffer is overwhelmed and log events are dropped. The sample shown is ...
lonix's user avatar
  • 22.5k
1 vote
1 answer
166 views

I'm using code-based Serilog config (not appsettings). I want to toggle a sink at runtime; specifically Seq, but others too. I know of the WriteTo.Conditional feature: var isFooEnabled = true; var ...
lonix's user avatar
  • 22.5k
1 vote
0 answers
82 views

I would like to log an extra data with an active log context but I have to use different methods: For example, I am trying to log web api requests with following settings: On Program.cs at the top: ...
mehmetilker's user avatar
0 votes
1 answer
397 views

Serilog is successfully logging but it is logging HTTP GET api calls automatically. How can the HTTP calls be suppressed? I have entries like this in the log file: 2024-10-25 06:24:10.040 -04:00 [INF] ...
Steve's user avatar
  • 13
1 vote
1 answer
486 views

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 ...
BOGsi's user avatar
  • 79
0 votes
0 answers
114 views

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 ...
JOYBOY's user avatar
  • 75
0 votes
1 answer
49 views

I am trying to set up a logging system that adds log files to subfolders based on the year. However I've been unable to programmatically specify the year. I can hardcode it and it works fine, but I ...
L. Wallach's user avatar
0 votes
0 answers
100 views

I have the following .Net Core - appsetting. It writes the log but writes multiple log files. Like this: How can I get write a single file every hour? thx!! Help! log-2024080512_001.txt 8/5 ...
Jon's user avatar
  • 1,757
0 votes
1 answer
433 views

Is it possible for serilog to send emails to pickup directory? I don't actually want to send emails right now it's just a POC. Thank you
David's user avatar
  • 5,557
0 votes
1 answer
223 views

I want to separate my logs in three different parts. Searched for logging libraries and the best one I found is Serilog. write http request logs to daily rolling txt files. write logs containing ...
Kazem Ma's user avatar
2 votes
2 answers
581 views

I would like to send email when error occurs in my NET 8.0 application. { "Name": "Email", "Args": { "From": "[email protected]", "Host&...
Géza's user avatar
  • 173
1 vote
1 answer
312 views

I have a ASP.NET core web API where I'm using Serilog to do the logging. I want to log Info from Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware in the log-file, but in the database I only want ...
Peter Poulsen's user avatar
2 votes
1 answer
576 views

I am trying to make a customized json log output using Serilog Expressions Format. I am using below template : "template": "{{\"Time\": \"{@t:yyyy-MM-ddTHH:mm:ss....
ayush garg's user avatar
0 votes
0 answers
85 views

How can i add Domain name as a part of my Serilog file The start up code is like below on Startup.cs file // This method gets called by the runtime. Use this method to add services to the container. ...
Sebastian's user avatar
  • 4,861
1 vote
2 answers
1k views

I am trying to get Serilog in my asp.net core project to log certain types of logs to a different sink depending on what is being logged, but all I end up with is 2 seperate logs with the exact same ...
Andrew Efurhievwe's user avatar
1 vote
1 answer
311 views

In a .Net Core Webapi project I am using Serilog to log. But when I use _logger.LogInformation("Token for user {UserName} created",data.username); and check the log file, the output is "...
AoLiGei's user avatar
  • 81
1 vote
0 answers
92 views

Trying to send logs to remote http server using serilog-sinks-http and Serilog.Exceptions is required to get exception details. In Serilog.Exceptions documents it required outputTemplate to be set to {...
Kazem Ma's user avatar
1 vote
1 answer
159 views

I am using the aws-logging-dotnet library to write the application logs to AWS Cloudwatch. The logger is configured via a json file: { "Serilog": { "Using": [ "AWS....
Marco Merola's user avatar
  • 1,037
0 votes
1 answer
166 views

For example right now I'm getting this log from serilog: The query uses the 'First'/'FirstOrDefault' operator without 'OrderBy' and filter operators. This may lead to unpredictable results. and this ...
buga's user avatar
  • 1,382
1 vote
1 answer
214 views

Adding Serilog to my ASP.NET Core (.NET 8) project, following the instructions in the serilog-aspnetcore repo. Everything appears to be in order; however if I try to inject a Microsoft.Extensions....
TaffarelJr's user avatar
1 vote
0 answers
286 views

I am using .net 8 and Serilog.AspNetCore 8.0.1 This is my config: builder.Logging.ClearProviders(); builder.Host.UseSerilog((context, provider, configuration) => configuration .ReadFrom....
mrt181's user avatar
  • 5,336
1 vote
1 answer
378 views

Below is sample code for passing Microsoft.Extensions.logging as input of logging partial method.but my scenarios is how pass Serilog.Ilogger as input of logging partial method. [LoggerMessage(...
ramu yepuganti's user avatar
-1 votes
1 answer
160 views

logging Compile-time logging source generator log info in logfile in .net 6.but in my case it can't logging. so can you please help me.
ramu yepuganti's user avatar
1 vote
1 answer
297 views

Compile-time logging source generator is not compatible with Serilog/NLog? Can you anybody please respond.
ramu yepuganti's user avatar
0 votes
1 answer
148 views

I have a basic CRUD web app that saves user form input to a database. The the current user id is saved along with the form input without any issues both locally and on IIS. However, when I save ...
Jesslyn's user avatar
  • 706
1 vote
1 answer
479 views

I'm really not sure what I'm missing. Filtering is not working at all for Serilog.Sinks.EventLog. Everything gets logged no matter what I've tried in the Filter configuration. I've used old syntax, ...
Howard Shank's user avatar
0 votes
1 answer
613 views

I am attempting to log both errors and information on API requests in my .NET Core 6 project. After setting it up in my Program.cs file it does output a log entry to the desired location. Below is my ...
Deus Ex Machina's user avatar
2 votes
1 answer
300 views

I am trying to turn off all the logs except the logs I put in directly in my application. I see a lot of http post and get calls from Blazor. How can I ignore those? HTTP "POST" "/...
tvbRPTI2754's user avatar
0 votes
1 answer
512 views

I've upgraded to Elastic 8.x from 7.x. Now my elastic endpoint requires connecting using https with a username, password and a tls cert. See examples here. If I use this approach within my kubernetes ...
Matthew S's user avatar
  • 1,040
0 votes
1 answer
877 views

I'm trying to log to my Elasticsearch instance some data from .NET 6.0 Web Api with Serilog.AspNetCore and Serilog.Sinks.Elasticsearch installed, but I need to use custom properties for example: ...
Pan Michal's user avatar
0 votes
0 answers
421 views

Im trying to catch an exception in an asp.net core app which seems to be not directly on application level. Im using serilog with Serilog.AspNetCore and an mqtt-sink: builder.Host.UseSerilog((ctx, ...
pyrogen's user avatar
  • 239
2 votes
0 answers
2k views

I'm creating a new Blazor Application with NET8. In the main project, the "server" project that contains the Blazor Client, I tried to add Serilog adding at the top of the Program.cs Log....
Enrico's user avatar
  • 6,902
0 votes
1 answer
88 views

Windows microservice created from .net core using does not write logs to path I have created a windows service from c# .net core which uses Serilog.Sinks.Async.File in appsettings.json as below "...
arbck90's user avatar