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

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

logflake-1.1.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file logflake-1.1.1.tar.gz.

File metadata

  • Download URL: logflake-1.1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for logflake-1.1.1.tar.gz
Algorithm Hash digest
SHA256 9e77d2f64e0a8bf304bcd791e173472f0bbecb4d313306d5c0ad6464d5efc346
MD5 9984593857940badd5a3958d85797b3f
BLAKE2b-256 e2e377038aeb6b08b1e6cac0b55bb4423b3ac6e3eaa9d700c7e1d179f235c8f9

See more details on using hashes here.

File details

Details for the file logflake-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: logflake-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for logflake-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dae08a32332741cd7ea86e8313a690808b8871adaaa963686923f8f8d1e7bd67
MD5 a1cde09b39cbe26c08944f1fc82e6ec7
BLAKE2b-256 5cd8b9d17bc1ed97ec16e15ad6dfa424f7ae2052b72b4794526ceebf5b6898af

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