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

feat: add verbose logs on every response #226

Merged
merged 3 commits into from
Jan 29, 2025
Merged

Conversation

AashishDhakal
Copy link
Collaborator

@AashishDhakal AashishDhakal commented Jan 27, 2025

Summary by CodeRabbit

  • Refactor: Replaced print statements with logging in process_request functions across multiple protocols for improved error tracking and information logging.
  • Refactor: Enhanced log messages in nx.py and salient.py to include vehicle details, improving traceability of requests.
  • Refactor: Added logging to the forward_to_SOAP_service function in soap.py, providing detailed logs on SOAP request outcomes.

Copy link

github-actions bot commented Jan 27, 2025

Image description CodeRabbit

Walkthrough

The changes introduce logging to various functions across multiple files, replacing print statements with structured logging. This enhances traceability by including vehicle details in logs and ensures consistent error and success message handling without altering the external behavior or interfaces of the code.

Changes

Files Summary
webhooks/middleware/protocols/crop_plate.py, openeye.py, synology_rest.py Introduced logging in process_request functions, replacing print statements with logging calls for error and info messages.
webhooks/middleware/protocols/nx.py, salient.py Enhanced logging in process_request and notify_salient functions by adding vehicle details to logs for better traceability.
webhooks/middleware/protocols/soap.py Added logging to forward_to_SOAP_service function, including vehicle plate number and request status in logs.

In lines of code where silence reigned,
Logs now dance, with details gained.
Errors caught, successes sung,
Vehicle tales in logs are strung. 🚗✨
A rabbit's joy in changes made,
For clearer paths, our logs parade! 🐇📜


Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between f636f5a and 55d3744 commits.
Files selected (6)
  • webhooks/middleware/protocols/crop_plate.py (3)
  • webhooks/middleware/protocols/nx.py (1)
  • webhooks/middleware/protocols/openeye.py (2)
  • webhooks/middleware/protocols/salient.py (2)
  • webhooks/middleware/protocols/soap.py (2)
  • webhooks/middleware/protocols/synology_rest.py (3)
Files skipped from review due to trivial changes (1)
  • webhooks/middleware/protocols/nx.py
Review comments generated (8)
  • Review: 5
  • LGTM: 3

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

@marcbelmont
Copy link
Collaborator

@adolfoarmas please review and test.

@parkpow parkpow deleted a comment from github-actions bot Jan 28, 2025
Copy link
Collaborator

@adolfoarmas adolfoarmas left a comment

Choose a reason for hiding this comment

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

LGTM!

@adolfoarmas adolfoarmas merged commit f832a1a into master Jan 29, 2025
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.

3 participants