You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of serilog/serilog-sinks-map#22, I ended up creating a custom extension method for my particular case, then configuring my appsettings to use it, adding the Using node in the json pointing to my assembly.
However, it only seems to work when the method is exposed in a public class. Trying to change it to internal and adding a InternalsVisibleTo attribute in my project targeting Serilog.Settings.Configuration didn't work at all: my method was just ignored.
I'd prefer keeping my method internal as I don't want anyone else from outside calling it (it is specific to this particular project).
Can this scenario be supported?
The text was updated successfully, but these errors were encountered:
Have you tried exposing the assembly to the Serilog assembly?
[assembly:InternalsVisibleTo("Serilog")]// may also need to expose to configuration as well[assembly:InternalsVisibleTo("Serilog.Settings.Configuration")]
As part of serilog/serilog-sinks-map#22, I ended up creating a custom extension method for my particular case, then configuring my appsettings to use it, adding the
Using
node in the json pointing to my assembly.However, it only seems to work when the method is exposed in a
public
class. Trying to change it tointernal
and adding aInternalsVisibleTo
attribute in my project targetingSerilog.Settings.Configuration
didn't work at all: my method was just ignored.I'd prefer keeping my method
internal
as I don't want anyone else from outside calling it (it is specific to this particular project).Can this scenario be supported?
The text was updated successfully, but these errors were encountered: