-
-
Notifications
You must be signed in to change notification settings - Fork 10
Description
I have a plugin architecture where a half dozen plugins correctly find InMemorySink.Instance containing log entries...as expected. However, I have one plugin that uses the exact same code...but InMemorySink.Instance is empty. The screenshot below shows that the inmemory sink has indeed collected entries, but the static access point doesn't see them.
At the point where I call CreateLogger
, I have run the following identity checks:
var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(x => x.GetName().Name.Contains("Serilog")).Select(x => x.Location);
var inmem = AppDomain.CurrentDomain.GetAssemblies().First(x => x.FullName.Contains("InMemory")).GetHashCode();
var hash = InMemorySink.Instance.GetHashCode();
When I run those same three checks at the location seen in the screenshot below, the results are as follows:
- The
assembles
var shows the InMemory assembly location is the same in both places. - The
inmem
var shows that the hash code of the InMemory assembly is the same in both places. - The
hash
var shows that the staticInMemorySink.Instance
has indeed changed values!
I conclude from this that there is no funny business regarding mismatched DLL's or DLL versions. Instead it seems that internally, InMemory is somehow overwriting its static value. This seems like a bug.
Please help. :)