serilog-extensions-hosting
serilog-extensions-hosting copied to clipboard
Serilog logging for Microsoft.Extensions.Hosting
I'm following the example and have the following code: ``` Log.Logger = new LoggerConfiguration() .Enrich.FromLogContext() .WriteTo.Console() .CreateBootstrapLogger(); try { Log.Information("Starting"); HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); builder.Services.AddSerilog((services, loggerConfiguration) => { loggerConfiguration .ReadFrom.Configuration(builder.Configuration)...
WIP, still needs a Serilog.Settings.Configuration update.
We are using Serilog in an application that runs as a Windows Service. One of our customers has recently experienced unexpected shutdowns of their machines. Upon restarting, our Service fails...
Hello there, in the 8.0.0 release, the target framework `netstandard2.1` was removed (commit f22e3fd700ee2b0fd55fca625b94ef6af5221c48), and in turn, support for a reloadable bootstrap logger was removed for any .NET Standard 2.1...
Example: ```cs Log.Logger = new LoggerConfiguration() .WriteTo.Debug() .WriteTo.Console() .WriteTo.File(BootstrapLogFilePath, LogEventLevel.Error) .CreateBootstrapLogger(); var builder = WebApplication.CreateBuilder(args); builder.Host.UseSerilog((context, services, loggerConfiguration) => loggerConfiguration .ReadFrom.Configuration(context.Configuration) .ReadFrom.Services(services)); ``` If an exception happens in the `configureLogger`...
Hi there! I'm kicking the tyres on `CreateBootstrapLogger` so that we can pull our log sink config from a secure store. To support parallel test running we don't use a...
If you use the `Two-stage initialization` from here: https://github.com/serilog/serilog-aspnetcore#two-stage-initialization ```c# public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .UseSerilog((context, services, configuration) => configuration .ReadFrom.Configuration(context.Configuration) .ReadFrom.Services(services) .Enrich.FromLogContext() .WriteTo.Console()) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup();...
Serilog 2.12 supports `IAsyncDisposable` on `Logger` and sinks. Async disposal helps avoid deadlocks in sinks that flush via async APIs on disposal. This will require checking and changing dispose handling...
Hi! I was resolving an issue that while `AddAplicationInsightsLoggerProvider()` sets the default [filter](https://docs.microsoft.com/en-us/dotnet/core/extensions/logging?tabs=command-line#how-filtering-rules-are-applied) rule to `LogLevel.Warning` ([here](https://github.com/microsoft/ApplicationInsights-dotnet/blob/ed0015a78a53b3a26e04d18eed442581bc7c571f/NETCORE/src/Shared/Extensions/ApplicationInsightsExtensions.cs#L426)) in the end it was ignored. I used Serilog with `UseSerilog()` and `writeToProviders:...