Skip to main content

Redis pub/sub logging handler for python

Project description

==========================================================================================
RedisLogs - A simplified version of RedisLog that works with Flask in a more intuitive way
==========================================================================================

A logging handler for Flask that publishes log messages using Redis's pub/sub system. You can use this to store python logs into Redis. Inspired on the package: https://github.com/jedp/python-redis-log by Jed Parsons.

Installation
------------

The current stable release ::

pip install flask_redis_logs


Requirements
------------

- redis

Usage
-----

::

>>> from redislogs.handlers import RedisHandler
>>> redis_handler = RedisHandler(
>>> host=[ Redis Host ],
>>> port=[ Redis Port ],
>>> db=[ Redis DB ],
>>> log_key=[ Redis Channel ]
>>> )
>>> redis_handler.setLevel(logging.INFO)
>>> app.logger.addHandler(redis_handler)
>>> app.logger.info("Infor log")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_redis_log-0.0.1.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file flask_redis_log-0.0.1.tar.gz.

File metadata

File hashes

Hashes for flask_redis_log-0.0.1.tar.gz
Algorithm Hash digest
SHA256 712a6f618aebba1008fd2cc262df0d5a0a58dbc3c2c829d0fc7c0a66c9d8f921
MD5 cb918209a18181c9dc6b6d34dd565d54
BLAKE2b-256 16aa9352c722e495ee3dccbabc401b451e90b5362dfb643df5cbe3a969bebba4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page