Closed RobSiklos closed 10 months ago
You've found a bug. The assumption in Asp.Net Core is that the Asp.Net Core logging infrastructure should be used. The logger adapter model is more intended to use for the HttpModule, the Mvc controller or the Owin package.
But I'll mark it as a bug, but don't hold your breath waiting for a fix.
A workaround is to add another IPostConfigureOptions
Version: Sustainsys.Saml2.AspNetCore2 - 2.9.0
Description In my
ConfigureServices
method, I am calling something like this:This used to work (maybe in an older version on .NET 4.x), but now (.NET 6), it seems like my logger adapter isn't being used at all.
It seems that in https://github.com/Sustainsys/Saml2/blob/329306180c708fa60428e424aa3a69c149166917/Sustainsys.Saml2.AspNetCore2/PostConfigureSaml2Options.cs#L48-L56, the logger I've set on the
SPOptions
is being discarded and replaced with something from the factory, or a null logger.What am I doing wrong? How can I make it so that the logger adapter I've specified on the
SPOptions
is used?Thanks in advance.