Skip to main content

Python logging library with support for multiple destinations

Project description

loghandler

loghandler allows you to easily log messages to multiple endpoints.

Using

Install loghandler via pip

pip install loghandler

In your code import LogHandler and initalize it.

from loghandler import LogHandler

logger = LogHandler({
    "log_level": "DEBUG",
    "outputs": [
        {
            "type": "STDOUT"
        }
    ]
})

You can now log messages to all your outputs via:

logger.log('fatal', Exception("Something went HORRIBLY wrong"))

Supported endpoints

  • STDOUT

Coming soon

  • elasticsearch
  • database (MySQL, PostgreSQL, SQLite, ...)
  • logstash
  • sentry

And probably more.

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

loghandler-0.1.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

loghandler-0.1.1-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

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