{"id":18926728,"url":"https://github.com/lobziik/rlog","last_synced_at":"2025-04-15T13:33:11.188Z","repository":{"id":17634538,"uuid":"20438868","full_name":"lobziik/rlog","owner":"lobziik","description":"Small handler and formatter for using python logging with Redis","archived":false,"fork":false,"pushed_at":"2019-09-17T10:41:50.000Z","size":34,"stargazers_count":27,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T19:53:35.705Z","etag":null,"topics":["logging","logs","python","redis"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lobziik.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-03T10:36:35.000Z","updated_at":"2024-04-12T10:00:51.000Z","dependencies_parsed_at":"2022-09-12T02:31:16.756Z","dependency_job_id":null,"html_url":"https://github.com/lobziik/rlog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lobziik%2Frlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lobziik%2Frlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lobziik%2Frlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lobziik%2Frlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lobziik","download_url":"https://codeload.github.com/lobziik/rlog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249080452,"owners_count":21209528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logging","logs","python","redis"],"created_at":"2024-11-08T11:16:58.559Z","updated_at":"2025-04-15T13:33:10.928Z","avatar_url":"https://github.com/lobziik.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"rlog\n====\n\nSmall handler and formatter for using python logging with Redis.\nThis is cleared and simplified version of [python-redis-log](https://github.com/jedp/python-redis-log\n) by Jed Parsons, with Python3 support.\n\n[![Build Status](https://travis-ci.org/lobziik/rlog.svg?branch=master)](https://travis-ci.org/lobziik/rlog)\n[![Coverage Status](https://coveralls.io/repos/lobziik/rlog/badge.png?branch=master)](https://coveralls.io/r/lobziik/rlog?branch=master)\n\nInstallation\n------------\n\nThe current stable release:\n\n    pip install rlog\n\nor:\n\n    easy_install rlog\n    \nor from source:\n\n    $ sudo python setup.py install\n\nUsage\n-----\n\n    \u003e\u003e\u003e from rlog import RedisHandler\n    \u003e\u003e\u003e logger = logging.getLogger()\n    \u003e\u003e\u003e logger.addHandler(RedisHandler(channel='test'))\n    \u003e\u003e\u003e logger.warning(\"Spam!\")\n    \u003e\u003e\u003e logger.error(\"Eggs!\")\n\nRedis clients subscribed to ``test`` will get a json log record by default.\n\n_RedisHandler_ and _RedisListHandler_ also accepted all redis client settings as kwargs. More info about client settings\nyou may find in [redis-py](https://github.com/andymccurdy/redis-py) documentation.\n\nCustom formatters also supported, handlers accept this as _formatter_ keyword argument. JSONFormatter from this package\nused as default. \n\nYou can use the ``redis-cli`` shell that comes with ``redis`` to test this.  At\nthe shell prompt, type ``subscribe my:channel`` (replacing with the channel\nname you choose, of course). You will see subsequent log data printed in the\nshell.\n\n\nAlso you can use it with Django:\n```Python\n    LOGGING = {\n        'version': 1,\n        'disable_existing_loggers': True,\n        'handlers': {\n            'redis': {\n                'level': 'DEBUG',\n                'class': 'rlog.RedisHandler',\n                'host': 'localhost',\n                'password': 'redis_password',\n                'port': 6379,\n                'channel': 'my_amazing_logs'\n            }\n        },\n        'loggers': {\n            'django': {\n                'level': 'INFO',\n                'handlers': ['redis'],\n                'propagate': True,\n            },\n        }\n    }\n```\n\nYou can also simply use it with logstash.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flobziik%2Frlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flobziik%2Frlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flobziik%2Frlog/lists"}