## Guvicorn_logger
This lib colored, normalizes and joins logs between Uvicorn and Gunicorn.
There is a common problem when using Uvicorn for Dev and Gunicorn for Prod,
normally the logs generated by Uvicorn wokers are not captured by Gunicorn.
This lib facilitates this configuration...
#### Easy config
```python
from guvicorn_logger import Logger
logger = Logger().configure()
```
#### Example
```python
logger.info("Message - Info")
logger.error("Message - Error")
logger.warning("Message - Warning")
logger.critical("Message - Critical")
```
#### Output
- Framework (Uvicorn, Gunicorn, Fastapi)
![alt text](https://raw.githubusercontent.com/carlos-rian/guvicorn_logger/main/docs/img/framework-web.JPG)
### FastAPI | asgi-correlation-id
```python
from asgi_correlation_id import CorrelationIdMiddleware
from fastapi import FastAPI
from guvicorn_logger import Logger
app = FastAPI()
app.add_middleware(CorrelationIdMiddleware)
logger = Logger(correlation_id=True).configure()
@app.get("/")
def main():
logger.info("Message - Info")
logger.error("Message - Error")
logger.warning("Message - Warning")
logger.critical("Message - Critical")
```
#### Output
![alt text](https://raw.githubusercontent.com/carlos-rian/guvicorn_logger/main/docs/img/fastapi.png)
Raw data
{
"_id": null,
"home_page": "https://github.com/carlos-rian/guvicorn_logger",
"name": "guvicorn-logger",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "gunicorn,uvicorn,logs,logging",
"author": "carlos.rian",
"author_email": "crian.rian@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/12/55/7fb399310ee50e06eff45930accc491e5b5bc9af26501fcf38440bf846ca/guvicorn_logger-0.1.14.tar.gz",
"platform": null,
"description": "## Guvicorn_logger\n\nThis lib colored, normalizes and joins logs between Uvicorn and Gunicorn.\nThere is a common problem when using Uvicorn for Dev and Gunicorn for Prod, \nnormally the logs generated by Uvicorn wokers are not captured by Gunicorn.\n\nThis lib facilitates this configuration...\n\n#### Easy config\n```python\nfrom guvicorn_logger import Logger\n\nlogger = Logger().configure()\n```\n\n#### Example\n\n```python\nlogger.info(\"Message - Info\")\nlogger.error(\"Message - Error\")\nlogger.warning(\"Message - Warning\")\nlogger.critical(\"Message - Critical\")\n```\n#### Output\n\n- Framework (Uvicorn, Gunicorn, Fastapi)\n![alt text](https://raw.githubusercontent.com/carlos-rian/guvicorn_logger/main/docs/img/framework-web.JPG)\n\n\n\n### FastAPI | asgi-correlation-id\n\n```python\nfrom asgi_correlation_id import CorrelationIdMiddleware\nfrom fastapi import FastAPI\n\nfrom guvicorn_logger import Logger\n\napp = FastAPI()\n\n\napp.add_middleware(CorrelationIdMiddleware)\n\n\nlogger = Logger(correlation_id=True).configure()\n\n\n@app.get(\"/\")\ndef main():\n logger.info(\"Message - Info\")\n logger.error(\"Message - Error\")\n logger.warning(\"Message - Warning\")\n logger.critical(\"Message - Critical\")\n\n```\n\n#### Output\n\n![alt text](https://raw.githubusercontent.com/carlos-rian/guvicorn_logger/main/docs/img/fastapi.png)",
"bugtrack_url": null,
"license": "MIT",
"summary": "Colored, normalizes and joins logs between Uvicorn and Gunicorn.",
"version": "0.1.14",
"split_keywords": [
"gunicorn",
"uvicorn",
"logs",
"logging"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "eea54d5435ba73b914fa3e4f41455c44",
"sha256": "3bb7d6b228a5fbb96b9b08b74cfa33ed23778ceb0f4f58f39b841683447ccb16"
},
"downloads": -1,
"filename": "guvicorn_logger-0.1.14-py3-none-any.whl",
"has_sig": false,
"md5_digest": "eea54d5435ba73b914fa3e4f41455c44",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 4550,
"upload_time": "2022-12-26T21:22:34",
"upload_time_iso_8601": "2022-12-26T21:22:34.922507Z",
"url": "https://files.pythonhosted.org/packages/be/7e/5132c187077db1a071a76c08f7eba56e702fe283424aa70acd1c5f89dcf9/guvicorn_logger-0.1.14-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "f46d0e837894db60951137dd9af2a2ff",
"sha256": "e3a777fefc8146c56e83e2536746b17a998dea4ed523546d084afe82ed9216e8"
},
"downloads": -1,
"filename": "guvicorn_logger-0.1.14.tar.gz",
"has_sig": false,
"md5_digest": "f46d0e837894db60951137dd9af2a2ff",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 4121,
"upload_time": "2022-12-26T21:22:36",
"upload_time_iso_8601": "2022-12-26T21:22:36.234103Z",
"url": "https://files.pythonhosted.org/packages/12/55/7fb399310ee50e06eff45930accc491e5b5bc9af26501fcf38440bf846ca/guvicorn_logger-0.1.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-26 21:22:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "carlos-rian",
"github_project": "guvicorn_logger",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "guvicorn-logger"
}