FastAPIRichLogger
Description
FastAPIRichLogger is a robust and visually appealing logging system for FastAPI applications. Utilizing the power of the rich library, it enhances the standard logging capabilities with color-coded log levels, detailed request-response data, and a user-friendly format that improves both readability and debugging.
Installation
Install FastAPIRichLogger with pip:
pip install fastapirichlogger
Usage
To use FastAPIRichLogger in your FastAPI application, follow these steps:
-
Import FastAPIRichLogger:
from fastapirichlogger import FastAPIRichLogger
-
Add Middleware to FastAPI:
app = FastAPI() app.add_middleware(FastAPIRichLogger)
Features
- Color-Coded Logging: Easily distinguish between different log levels thanks to color coding.
- Request-Response Details: Logs include detailed information about HTTP requests and responses.
- Execution Time Tracking: Monitor the time taken for each request to process.
- Automatic Log ID Assignment: Each request gets a unique log identifier for easier tracking.
Example Images
Below are example images showing the FastAPIRichLogger in action:
-
Success Log Example:
-
Error Log Example:
Contributing
Contributions are what make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.md for more information.
Contact
Kevin Saltarelli - kevinqz@gmail.com
Project Link: https://github.com/kevinqz/fastapirichlogger
Metadata
Release files for fastapirichlogger 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fastapirichlogger-0.1.4.tar.gz | 4.1 kB | Without provenance | Details for fastapirichlogger-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastapirichlogger-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for fastapirichlogger-0.1.4-py3-none-any.whl |
Total release size: 9.0 kB
Release files / fastapirichlogger-0.1.4.tar.gz
| Download URL | fastapirichlogger-0.1.4.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f4d1d76c2736d011361f433111b0e81769edec7ae20c01c71da70f41ad77520
|
|
BLAKE2b-256 checksum How to use checksums |
350de8cc27761857c95ce179f28c837e3d2007af4277c739157f3d56dcb464e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.14
|
Release files / fastapirichlogger-0.1.4-py3-none-any.whl
| Download URL | fastapirichlogger-0.1.4-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
792c50633e8ea9b0027b5f3934e565677343cf7926410f0afb8064e0cfaa11a3
|
|
BLAKE2b-256 checksum How to use checksums |
42aa5f148a20d0b0f3eb849a8963f065691b83810aff3e7c87bb56007e2b0e89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.14
|
Security for fastapirichlogger 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.