pm4net / serilog-enrichers-callerinfo

A simple Serilog enricher to add information about the calling method.
Apache License 2.0
10 stars 2 forks source link

Always log the first assembly #4

Closed kenny-reyes closed 1 month ago

kenny-reyes commented 1 month ago

NET 8

The enricher can't log more than the initial Assembly

      {
        "Name": "WithCallerInfo",
        "Args": {
          "includeFileInfo": "true",
          "assemblyPrefix": "Company.",
          "startingAssembly": "Company.ApiHost"
        }
      }    

In EnricherConfiguration.cs GetAssemblies line 89

AssemblyExistsInList(asmNames, asm)

Always true

johannesmols commented 1 month ago

Hi @kenny-reyes, thanks for raising the issue. I tested and can see I made an error of checking the original assembly instead of the referenced one when deciding whether to include it. I fixed this and it is now available in v1.0.5. Could you check if that solves your issue?