serilog / serilog-extensions-hosting

Serilog logging for Microsoft.Extensions.Hosting
Apache License 2.0
141 stars 34 forks source link

Add overload to UseSerilog that extends ``IServiceCollection``. #68

Closed AraHaan closed 1 year ago

AraHaan commented 1 year ago

The host builder is great, until you have a usecase for using a ServiceCollection in place of the hosting package stuff.

Or at least a special library that provides an UseSerilog that extends IServiceCollection. I have a use case for this because I need to debug my application to find out where the issue is where it consumes most of my VPS's RAM (the VPS is ubuntu with 2 GB of RAM) (which oddly is not reproducible on my pc). The way I will debug this is to instead keep the database part (which will require serilog to log the things it logs) while creating and populating the service collection will be done in python (using pythonnet) and discord.py (so I can rule out Remora.Discord or efcore as the RAM hoggers).

I probably could use the generic host, however I would need to figure out if I could then map python objects to .NET objects (as in from python only objects to .NET ones).

mburumaxwell commented 1 year ago

Hopefully fixed in #70 ?