question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Convert this package into a pure metapackage, so that `UseSerilogRequestLogging()` can be made available without any other dependencies

See original GitHub issue

https://github.com/serilog/serilog-aspnetcore/blob/76f4a513e0538418b829ff4ef266444351b726fa/src/Serilog.AspNetCore/Serilog.AspNetCore.csproj#L31

There is no code in the project that depends on the Serilog.Sinks.File package.

This causes the resulting Serilog.AspNetCore NuGet package to carry along an unnecessary dependency.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
nblumhardtcommented, Jan 19, 2022

I’m not keen on dropping the dependencies here, not least because of the downstream breakage, but also because this creates one more barrier to adopting Serilog: the default .NET web SDK includes the console logger provider for MEL, there’s no extra step to install it; the default .NET web SDK enables JSON config support … etc. etc.

Apart from the logging middleware in this package, everything else is already in fine-grained packages. If we extract the logging middleware to its own package, referenced from this one, then it’s easy to just install Hosting, Configuration, the middleware package, and whatever other sinks you require. Let’s push this one forward 😃

2reactions
GraemeFcommented, Dec 14, 2021

This is starting to cause problems - the unnecessary dependencies are becoming outdated which can lead to version downgrade errors when building (especially when targeting linux, it seems), and the workaround is to add direct dependencies to the later versions of these implicitly-included packages from our projects. Feels very wrong, as our projects don’t use these packages at all! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Serilog.AspNetCore in ASP.NET Core ... - Andrew Lock
Request logging without Serilog. For this post we'll start with a basic ASP.NET Core 3.0 Razor pages app, created using dotnet new webapp...
Read more >
ASP.NET Core 2.2 - Serilog | Missing out on events
Any services/controllers I make are receiving the dependencies from the registrations I've done in Core library's Autofac module (including the ...
Read more >
Reducing log verbosity with Serilog RequestLogging
In this post I describe how you can use Serilog.AspNetCore to reduce the number of logs generated by every request in ASP.NET Core...
Read more >
How to use advanced Serilog features in ASP.NET Core ...
This article talks about a few advanced capabilities in Serilog such as reducing log verbosity and log message summary and how you can...
Read more >
Microsoft.AspNetCore.All metapackage for ASP.NET Core ...
All supported packages by the Entity Framework Core. Internal and 3rd-party dependencies used by ASP.NET Core and Entity Framework Core.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found