alefranz / MELT

MELT is a free, open source, testing library for the .NET Standard Microsoft Extensions Logging library. It is a solution to easily test logs.
Apache License 2.0
72 stars 5 forks source link

Testing with Serilog while using dependency injection with generic host #32

Open pwm1234-sri opened 1 year ago

pwm1234-sri commented 1 year ago

Thanks for your work on MELT. I have tried for a while today, but I have been unable to get a test working that uses dependency injection of serilog with a generic host. I expect this is possible, but I was unable to mimic the asp.net host logic so it would work with a generic host. Can you provide a serilog example that uses a generic host rather than an asp.net host?

alefranz commented 1 year ago

Hello! Thank you for considering this library and providing feedback. Any chance you can share a sample of what you are trying to achieve? It would help me getting back to you quickly.

Thank you!