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

Fix exception logging - #149

Merged
Eric Johnson (EricJohnson327) merged 1 commit into
mainfrom
user/dkbennett/fixexceptionlogging
Apr 11, 2024
Merged

Fix exception logging#149
Eric Johnson (EricJohnson327) merged 1 commit into
mainfrom
user/dkbennett/fixexceptionlogging

Conversation

@dkbennett

Copy link
Copy Markdown
Member

Summary of the pull request

This fixes the ordering of exception logging such that exceptions will be properly logged.

References and relevant issues

Closes #148

Detailed description of the pull request / Additional comments

Serilog has multiple valid logging signatures, but the only one that logs exceptions is if the exception is the first argument. Exceptions can be placed validly as 2nd, 3rd, etc. arguments after a string but those are assumed to be part of the message template and otherwise ignored. This resulted in valid log messages but exceptions that were intended to be logged were not being logged.

  • Fixed all Error, Warning, Debug, and Information logging that included an exception at the end of the message and move dit to the front of the message so it would be logged instead of swallowed.

Validation steps performed

  • Build validation

PR checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated

@dkbennett David Bennett (dkbennett) added the Needs-Second Pull request that needs another approval label Apr 10, 2024
@EricJohnson327
Eric Johnson (EricJohnson327) deleted the user/dkbennett/fixexceptionlogging branch April 11, 2024 01:48
@krschau Kristen Schau (krschau) removed the Needs-Second Pull request that needs another approval label Apr 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exceptions are not being logged

3 participants