Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python AsyncIO Logstash Logger

Project description

aio-logstash

python asyncio logstash logger adapter

Installation


pip install aio-logstash

Usage


import logging
import asyncio
from aio_logstash.handler import TCPHandler

async def main():
    handler = TCPHandler()
    await handler.connect('127.0.0.1', 5000)
    logger = logging.getLogger(__name__)
    logger.setLevel(logging.INFO)
    logger.addHandler(handler)

    logger.info('test', extra={'foo': 'bar'})

    await handler.exit()


if __name__ == '__main__':
    asyncio.run(main())

Project details


Release history Release notifications

Download files

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

Files for aio-logstash, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size aio_logstash-0.1.0-py3-none-any.whl (9.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size aio-logstash-0.1.0.tar.gz (4.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page