Skip to content
This repository was archived by the owner on Jun 1, 2024. It is now read-only.
This repository was archived by the owner on Jun 1, 2024. It is now read-only.

Log Events not Written to Sink with Inner Exceptions #281

Open
@msfreed

Description

@msfreed

Does this issue relate to a new feature or an existing bug?

  • Bug
  • New Feature

What version of Serilog.Sinks.Elasticsearch is affected? Please list the related NuGet package.
8.0.0

What is the target framework and operating system? See target frameworks & net standard matrix.

  • netCore 2.0
  • netCore 1.0
  • 4.7
  • 4.6.x
  • 4.5.x

Please describe the current behavior?
Log events are not being written to the configured sink/s if either the ElasticsearchJsonFormatter OR ExceptionAsObjectJsonFormatter are configured AND the Error level is specified AND an exception is specified with an inner exception AND formatStackTrackAsArray is set to true.

Please describe the expected behavior?
Log events with an inner exception would be written to the configured sink/s

If the current behavior is a bug, please provide the steps to reproduce the issue and if possible a minimal demo of the problem

var logger = new LoggerConfiguration()
   .WriteTo.Console(new ElasticsearchJsonFormatter(formatStackTraceAsArray: true))
   .CreateLogger();
logger.Error(new Exception("outer", new Exception("inner")), "failure");

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions