serilog Questions
2
Solved
I have written a Windows Service which logs its operations using Serilog
The application also uses Autofac for dependency Injection support and Seq for structured logging.
using Autofac;
public...
Yuyuan asked 24/3, 2019 at 18:19
2
Solved
I am trying to read the application name from the App.Config. This is net461 console app. I have added the Serilog.Settings.AppSettings package. And also added the following serilog configs on App....
Secret asked 16/1, 2018 at 11:35
4
Solved
I am using Serilog to log information about an asp.net core 2.1 application hosted on IIS. When exceptions occur, I am informed by email. The thing is, some exceptions happen without hurting the ap...
Cartercarteret asked 29/8, 2018 at 19:17
3
Solved
I'm injecting typed HTTP clients in a .NET Core app. I'm also logging with Serilog. I have not intentionally configured any logging of HTTP activity. It magically came with. How do I turn this off?...
2
Solved
In Serilog, you can easily enable rolling log files:
Log.Logger = new LoggerConfiguration()
.WriteTo.File("log-.txt", rollingInterval: RollingInterval.Day)
.CreateLogger();
This will create a ...
4
Solved
I have a .NET Core 2.0 application in which I successfully use Serilog for logging. Now, I would like to log some database performance statistics to a separate sink (they are not for debugging, whi...
Screenplay asked 1/10, 2017 at 19:59
3
I'm working on a ASP.NET Core 3.1 application. I want to log events to file and be able to read them during application runtime. To do that I'm trying to use Serilog.Extensions.Logging.File NuGet p...
Foresail asked 8/3, 2020 at 14:4
3
Solved
I have the following appsettings.json configuration:
{
"Serilog": {
"Using": [],
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"System": "Warning"
}
},...
Lilia asked 17/3, 2020 at 14:37
5
Solved
Is it possible to use Serilog with OpenTelemetry?
https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/logs/getting-started/README.md
Innsbruck asked 14/5, 2021 at 20:43
5
Solved
I have a main logger for my solution which is defined as
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Verbose()
.WriteTo.LiterateConsole(LogEventLevel.Verbose)
.WriteTo.RollingFile($"{...
3
Solved
The UseSerilog() extension is deprecated* for IWebHostBuilder in serilog-aspnetcore version 5.0.0. However, I'm still using a IWebHostBuilder and a Startup class (aspnetcore 6), and IWebHostBuilder...
Shock asked 21/2, 2022 at 16:7
3
Based on the details in this blog post from Nicholas Blumhardt (I know, it's a few years old, but I can't seem to find anything more current), I'd expect to be able to use the following (minimal) c...
Feuar asked 25/2, 2021 at 0:1
6
Solved
Is there anyway to enrich all Serilog output with the Method Name.
For Instance consider If I have the following;
Public Class MyClassName
Private Function MyFunctionName() As Boolean
Logger....
2
Solved
We would like to get log for:
Console (all log)
File (all log)
File (only filtered log)
All of this configured in appsettings.json.
This is the appsettings.json file for the application:
{
"...
Carbohydrate asked 16/3, 2018 at 7:32
1
Solved
Is there a built-in configuration setting for the Serilog mssqlserver sink to automatically delete log entries older than a certain number of days (or weeks or months)? Basically, I'm looking for t...
Creech asked 2/1, 2020 at 16:40
3
I've created a C# .net5.0 console application and during testing Serilog has been working without incident, logging to Console and File (same folder; path="log.txt"). However, when I run ...
Puckery asked 28/4, 2021 at 19:6
3
Solved
I'm using vs 2017, writing a netcoreapp2.0 library, and testing it with a UnitTest project (XUnit and NUnit give same results).
I've noticed that unless I'm forcefully Disposing of my Serilog logge...
3
I'm currently writing an integration test (https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-5.0) for my ASP .Net Core 5 REST API.
The API is using Serilog for lo...
Phototube asked 21/12, 2020 at 9:32
3
Solved
I am using Serilog for logging in my .net 6 web API and would like to expose an endpoint to enable me to change the global logging level. This will enable me to switch the level via a front end tog...
6
I'm trying to configure Serilog for a .NET Core project. Here's what I have in my appsettings.json:
"Serilog":
{
"MinimumLevel": "Verbose",
"Enrich": [&q...
3
Solved
What is the expected behavior when an application that uses Serilog and Seq can't find a server to send the logs to? Will every attempt to log throw an exception?
I would like my app to use the Seq...
9
Solved
I have a console .net core app that uses entity framework core.
The app uses logging framework to write to file and console:
serviceProvider = new ServiceCollection()
.AddLogging()
.AddDbContex...
Sheree asked 7/2, 2017 at 1:0
5
Solved
I've created a .NET Core 3.1 project using a Host, the IoC container with IServiceCollection and implemented logging allover the place using the ILogger<T> interface from Microsoft.Extensions...
2
I wanted my application to have capability of logging to a file, so I started to look for something more than default .NET Core 2.2 logging framework. I see that Serilog might do the job. However, ...
3
Solved
I'm trying to set up a logging mechanism using Serilog. I want to write the logs to both the file and a SQL Server database.
Currently I can write the logs to the file system, but I cannot write to...
Reinhart asked 26/1, 2022 at 20:14
1 Next >
© 2022 - 2024 — McMap. All rights reserved.