Skip to main content

LogFlake Python Client

Project description

LogFlake Client Python

This repository contains the sources for the client-side components of the LogFlake product suite for applications logs and performance collection for Python applications.

🏠 [LogFlake Website](https://logflake.io) | 🔥 [CloudPhoenix Website](https://cloudphoenix.it)

Downloads

PyPI Package Name Version Downloads
LogFlake.Client.Python PyPI - Version PyPI - Downloads

Usage

Retrieve your application-key from Application Settings in LogFlake UI.

from logflake import logflake

logger = logflake.LogFlake('application-key')
logger.send_log(logflake.LogLevels.DEBUG, None, 'Hello World')

logger.shutdown()

Use logging handler example

LOGGING = {
    "version": 1,
    "formatters": {
        "logflake": {
            "()": "django.utils.log.ServerFormatter",
            "format": f"%(name)s %(module)s.%(funcName)s() %(message)s",
        },
    },
    "handlers": {
        "logflake": {
            "class": "logflake.logflake.LogFlakeHandler", # REQUIRED
            "app_id": "application-key",                  # REQUIRED
            "formatter": "logflake",                      # OPTIONAL: Use custom formatter
            "server": "https://app.logflake.io",          # OPTIONAL: Use custom logging server
            "level": logging.ERROR,                       # OPTIONAL: Set minimum severity
        }
    },
    "root": {
        "handlers": ["logflake"], # REQUIRED
    },
}

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

logflake-1.2.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

logflake-1.2.1-py3-none-any.whl (4.0 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