Skip to main content

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.

import asyncio
import logging
import noblklog

logging.basicConfig(
    level=logging.INFO,
    handlers=[
        noblklog.AsyncStreamHandler(),
    ],
)
log = logging.getLogger(None)

log.info('It is logging synchronously outside an event loop! Magic!')

async def main():
    log.info('And asynchronously inside an event loop! Even more magic!')

asyncio.run(main())

For more details see the documentation.

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.5.tar.gz (12.6 kB view details)

Uploaded Source

File details

Details for the file noblklog-0.5.tar.gz.

File metadata

  • Download URL: noblklog-0.5.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for noblklog-0.5.tar.gz
Algorithm Hash digest
SHA256 82c4b65ff0d4894eeb5dc93c9c278f4d6a3faf653db3cef66fb9751e2b3acf7e
MD5 102521a6d4e03e7cd01964a9de1779c1
BLAKE2b-256 bca00c050a3f8259499ad1ab311480165c7b8780fe2d905ddb2af78549658223

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