Non-blocking asyncio handlers for Python logging.
Project description
noblklog
Keep using the logging you're accustomed to, without having to fear it blocking your asyncio event loop.
Installation
$ pip install noblklog
Usage
import asyncio
import logging
import noblklog
root = logging.getLogger(None)
root.setLevel(logging.INFO)
root.addHandler(noblklog.AsyncStreamHandler())
root.info('It is logging synchronously outside an event loop! Magic!')
async def main():
root.info('And asynchronously inside an event loop! Even more magic!')
asyncio.run(main())
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
noblklog-0.2.tar.gz
(8.3 kB
view hashes)