markmcdowell/NLog.Targets.ElasticSearch

Does not work with NLog.Web.AspNetCore 5

venca-x opened this issue · 2 comments

After upgrade to NLog.Web.AspNetCore 5, does not work

If you are using enableJsonLayout="true" then you are waiting for this bug-fix: #159 (The workaround while waiting for the bug-fix to be released is to explicit assign pipeline="").

If not using enableJsonLayout="true", then you should enable NLog Internal Logging and look for warnings and errors.

Notice NLog 5 also includes the breaking change NLog Extensions assemblies will not load automatically

So you explicit specify the extension in NLog.config:

  <extensions>
    <add assembly="NLog.Targets.ElasticSearch"/>
  </extensions>

See also NLog.config example at https://github.com/markmcdowell/NLog.Targets.ElasticSearch

Alternative you can include the extension-assembly-name in the target-type-alias (New syntax introduced with NLog5)