Skip to content

Pyxis-Cognitive-Solutions/logging_middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logging_middleware

A simple Django middleware for logging requests, function calls, and exceptions.

Installation

You can install logging_middleware using pip:

pip install git+https://github.com/Pyxis-Cognitive-Solutions/logging_middleware

Usage

  1. Add logging_middleware.JsonLoggingMiddleware to the MIDDLEWARE list in your Django settings:
MIDDLEWARE = [
    ...
    'logging_middleware.JsonLoggingMiddleware',
    ...
]

Features

  • Logs incoming requests, including method, URL, and headers.
  • Logs function calls with arguments and return values.
  • Logs exceptions with stack traces for easier debugging.

License

This project is licensed under the MIT License.

About

Logging middleware library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages