Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Exceptions Type and Message #161

Merged
merged 2 commits into from
Aug 31, 2023
Merged

Add Exceptions Type and Message #161

merged 2 commits into from
Aug 31, 2023

Conversation

KarstenSchnitter
Copy link
Contributor

#160 outlines the requirement to have exception type and messages in the emitted log events. This capability has been added to the BaseFieldSuppliers for the Log4j and Logback integrations. This allows users to overwrite the default values by custom ContextFieldSuppliers. The stacktrace remains to be added at the very end of the log event generation.

Fix and run the code and documentation generation for
the two new fields exception_type and exception_message.
Changes to the Python scripts are required for newer pyyaml
versions.

Signed-off-by: Karsten Schnitter <[email protected]>
Adds the two fields exception_type and exception_message to
the BaseFieldSuppliers for Log4j and Logback. This allows users
to override the provided values with custom FieldSuppliers. Basic
Unit Tests were added.

Performance implications should be minimal for events without
exceptions. If there are exceptions, the only longer check is for
the message to be non-blank.

Signed-off-by: Karsten Schnitter <[email protected]>
@KarstenSchnitter KarstenSchnitter added this to the 1.7.1 milestone Aug 31, 2023
@KarstenSchnitter KarstenSchnitter linked an issue Aug 31, 2023 that may be closed by this pull request
Copy link
Contributor

@nicklas-dohrn nicklas-dohrn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KarstenSchnitter KarstenSchnitter merged commit a821741 into main Aug 31, 2023
1 check passed
@KarstenSchnitter KarstenSchnitter deleted the exceptions branch August 31, 2023 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add exception_type field to the logs
2 participants