Skip to main content

A Python library for advanced logging with support for multiple outputs and optional Slack integration.

Project description

QCML Logging Library

QCML Logging is a Python library that provides advanced logging setup with support for multiple outputs (terminal, file) and Slack integration. It includes features like color-coded logs, JSON formatting, and contextual information.

Installation

You can install the library using pip:

pip install qcml-logging

Usage

Here’s an example of how to set up logging:

import qcml_logging

context_info = {
    'user_id': '12345',
    'session_id': 'abcde'
}

slack_credentials = ["your-slack-token", "#your-channel"]

qcml_logging.log_setup(
    level="DEBUG",
    output="both",
    logs_path="my_logs",
    use_json=False,
    keyword_filters=["error", "critical"],
    use_color=True,
    asynchronous=True,
    add_context=True,
    context_info=context_info,
    slack_notify=True,
    slack_credentials=slack_credentials
)

logging.debug("This is a debug message.")

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

qcml_logging-0.1.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

qcml_logging-0.1.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file qcml_logging-0.1.0.tar.gz.

File metadata

  • Download URL: qcml_logging-0.1.0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.8

File hashes

Hashes for qcml_logging-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ad08eea435ea998677e9a2b3d580854e0c199147f00466c5db341b6f07fc5607
MD5 bb48b5dc9533ef9d4015959773793dff
BLAKE2b-256 1c7691e2303a992b7016136e2031a987ccaa2e76c89dca4e01ab76562d3b2bf7

See more details on using hashes here.

File details

Details for the file qcml_logging-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: qcml_logging-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.8

File hashes

Hashes for qcml_logging-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5924c8ffa1cf43cbec041250ea4edea6d4e62fe491cb9201f360b6ac6d8dfe09
MD5 e7f184af382646c72a95f9df93ee1a6c
BLAKE2b-256 0b5ba67ca6c5125af2d2c04a55c4e108912e3728b320706c6dfd924952db07ae

See more details on using hashes here.

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