Skip to content

Comments

Logging and Exceptions handling#7

Merged
FarhanAliRaza merged 11 commits intomasterfrom
log_exceptions
Oct 10, 2025
Merged

Logging and Exceptions handling#7
FarhanAliRaza merged 11 commits intomasterfrom
log_exceptions

Conversation

@FarhanAliRaza
Copy link
Collaborator

No description provided.

@FarhanAliRaza FarhanAliRaza changed the title Loggin and Exceptions handling Logging and Exceptions handling Oct 10, 2025
* Updated _handle_generic_exception method to accept an optional request parameter for improved error reporting.
* Modified generic_exception_handler to utilize Django's ExceptionReporter for HTML output in debug mode, falling back to JSON if necessary.
* Added tests to verify the behavior of the generic exception handler in debug mode, ensuring correct HTML response formatting.
* Updated BENCHMARK_BASELINE.md and BENCHMARK_DEV.md with new performance metrics reflecting changes in request rates and response times across various endpoints.
* Adjusted Makefile to reduce the number of processes from 8 to 4 for benchmarking.
* Enhanced logging middleware and configuration to support non-blocking logging and improved log level management based on response status and sampling.
* Refined logging setup in Django settings to differentiate between development and production environments, ensuring appropriate log levels are applied.
* Updated BENCHMARK_BASELINE.md and BENCHMARK_DEV.md with new performance metrics reflecting changes in request rates and response times across various endpoints, including significant improvements in the root endpoint and other key routes.
* Adjusted Makefile to increase the number of processes from 4 to 8 for benchmarking.
* Enhanced logging middleware to ensure proper cleanup of queue listeners and improved exception handling during logging setup.
* Refined logging configuration in Django settings to ensure appropriate log levels are applied in production environments.
* Updated test cases to ensure the generic exception handler returns HTML in debug mode and handles requests correctly.
* Added tests for scenarios without a request context and for fallback to JSON when HTML generation fails.
* Improved assertions to provide clearer error messages for debugging purposes.
* Verified that exception tracebacks are preserved and formatted correctly in both HTML and JSON responses.
@FarhanAliRaza FarhanAliRaza merged commit c23b7d8 into master Oct 10, 2025
@FarhanAliRaza FarhanAliRaza deleted the log_exceptions branch October 24, 2025 12:48
@claude claude bot mentioned this pull request Dec 7, 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.

1 participant