Questions tagged [serilog-exceptions]

The Serilog.Exceptions package for Serilog.

31 questions
1
vote
0 answers

Serilog custom exception message

My current task : I need to remove StackTrace from {Exception} object in OutputTemplate "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "[{Timestamp:yyyy:MM:dd hh:mm:ss} {CorrelationId} {Level:u3}]…
andrey1567
  • 97
  • 1
  • 13
1
vote
1 answer

Add a custom column to Serilog Table in Azure Table Storage for logging new information

It's possible to add a new column in a Serilog Table in Azure table Storage for logging new extra field like accountID or login Name? I think it's possible to add a new column but its possible to pass extra fields in Serilog like i said for the new…
0
votes
1 answer

In serilog ,Is there any property to maintain the configured filename is latest log

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 trace_001.txt. but i want the latest log always…
0
votes
0 answers

Keep Track of Rolling out of a Log file using Serilog

I am using the Serilog for Logging and I have configured it roll out every day, but I want to add a specific log line as a last line of every log file for which I have to keep track when the file is rolling out and new file is created. Any one have…
0
votes
1 answer

Issue injecting Serilog into an Azure Function App

I am trying to get Serilog to work in my Azure Function App. I've just upgraded to .Net6, however, when the project starts, I'm getting this error for all the functions: Microsoft.Azure.WebJobs.Host: Error indexing method 'MyFunctionName'.…
Tree Frog
  • 637
  • 5
  • 12
0
votes
1 answer

Add data to new columns in SQL Server with Serilog

I'm using SerlLog with SQL Server and after configuration I have the following table in SQL Server: I want to add data to the columns Message LikeExpression and other columns for occurrence. I tried the following code Log.ForContext("Message",…
0
votes
1 answer

serilog not creating log files

we are using the following piece of serilog code which writes events to console and file, the file and console logging works fine on my machine, but in the other developers machine console logging works but the file logging does not work and to add…
nen
  • 621
  • 2
  • 10
  • 26
0
votes
1 answer

How can I disable Serilog's automatic exception logging feature?

I am using SeriLog(with Loki sink), and I also have an Exception handler lambda-like in here, which catches all exceptions happened during code execution and logs them with appropriate labels. But, Serilog itself, automatically catches all unhandled…
Davud Safarov
  • 498
  • 4
  • 12
0
votes
1 answer

Difference between Serilog MinimumLevel.ControlledBy and MinimumLevel.Override in web api core?

Can anyone please explain to me what is the difference between Serilog MinimumLevel.ControlledBy and MinimumLevel.Override in web api core?
0
votes
0 answers

Serilog Log Exception and Other Properties

I am implementing Serilog in a WCF Service application. In my Global.asax, I am trying to set up the global logger to print the time of the log, the thread ID, any exceptions of that may be logged, and the additional properties in json format…
jlat96
  • 491
  • 1
  • 5
  • 10
0
votes
2 answers

Serilog, ExceptionDetails and outputTemplate

I'm working with .Net Core 3.1 and Serilog but I have a small but annoying problem with the log output. Configuration My appsettings.json is { "Serilog": { "Properties": { "Application": "Testing GZip" }, "WriteTo": [ { …
Attilio Gelosa
  • 555
  • 1
  • 8
  • 23
0
votes
0 answers

exception is occuring when elastic server is missing

Below is the code for serilog elastic search.It's working perfectly when elastic service is running but fails when the server is not available .WriteTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri("http://localhost:9200/")) // humio elastic…
11738472
  • 184
  • 3
  • 22
0
votes
0 answers

Unit test for Serilog write to console

Application is in .net framework and using Serilog for logging. Configuration Logger = new LoggerConfiguration() .Enrich.FromLogContext() .MinimumLevel.Debug() .WriteTo.Console() .CreateLogger() In Unit test how to verify that…
winadi
  • 141
  • 1
  • 6
0
votes
1 answer

serilog : logs only after application stop

I trust you doing good, I using Serilogs for first time. I use ASP CORE 3.0. I notice, that Serilogs only logs event after I stop the application, It does not log live events. my appsettings.Development.json "Serilog": { "MinimumLevel": { …
UtpMahesh
  • 410
  • 10
  • 25
-1
votes
1 answer

Unable to Delete Log when creating from Serilog.Log

I'm using .Net Core 3.1 Application which is API. Due to below code, I'm able to generate example.txt log file however unable to delete this. "The process cannot access the file '' because it is being used by another process w3p". Log.Logger = (new…