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

[Added] Added a Logging Middleware that does not truncate mesage payload. #218

Merged
merged 3 commits into from
Apr 13, 2022

Conversation

jorchube
Copy link
Contributor

@jorchube jorchube commented Apr 8, 2022

🎩 What?

Added a VerboseLoggingMiddleware that mimics the output format of the current LoggingMiddleware but does not truncate the message payload on the post_process and pre_publish failure hooks.

🤔 Why?

The current LoggingMiddleware relies on the __repr__() method of the google pubsub message, which truncates the message payload. This, in turn, means that any message payload log will have that payload truncated.

The VerboseLoggingMiddleware implementation proposed in this PR adheres to the exact same behavior and formatting of the existing LoggingMiddleware, but enabling non-truncated message payload logs.

Copy link
Contributor

@daniel-ruiz daniel-ruiz left a comment

Choose a reason for hiding this comment

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

It looks good to me 👍

@jorchube jorchube merged commit 1b0fd82 into master Apr 13, 2022
@jorchube jorchube deleted the verbose-logging branch April 13, 2022 07:37
csaroff pushed a commit to csaroff/rele that referenced this pull request Apr 19, 2023
…oad. (mercadona#218)

* Add verbose logging middleware

* Add VerboseLoggingMiddleware to contrib/__init__.py

* Fix linting
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.

2 participants