Skip to main content

No project description provided

Project description

tow-slack-plog

.. image:: https://img.shields.io/pypi/pyversions/tow-slack-plog.svg?maxAge=2592000?style=flat-square :target: https://pypi.python.org/pypi/tow-slack-plog

Python logging handler for Slack webhook integration with simple configuration.

Installation

.. code-block:: bash

pip install tow-slack-plog

Example

Simple '''''' .. code-block:: python

import logging from slack_plog import SlackPlog

sh = SlackPlog('YOUR_WEB_HOOK_URL') # url is like 'https://hooks.slack.com/...' logging.basicConfig(handlers=[sh]) logging.warning('warn message')

Using logger '''''''''''' .. code-block:: python

import logging from slack_plog import SlackPlog

logger = logging.getLogger(name) logger.setLevel(logging.DEBUG)

sh = SlackPlog(slack_webhook_url='YOUR_WEB_HOOK_URL') sh.setLevel(logging.DEBUG)

logger.addHandler(sh)

logger.debug('debug message') logger.info('info message') logger.warn('warn message') logger.error('error message') logger.critical('critical 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

tow_slack_plog-0.1.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

tow_slack_plog-0.1.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file tow_slack_plog-0.1.2.tar.gz.

File metadata

  • Download URL: tow_slack_plog-0.1.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.19.0-32-generic

File hashes

Hashes for tow_slack_plog-0.1.2.tar.gz
Algorithm Hash digest
SHA256 358f824ff9451b495e78727715d0e57eda3bade416b6c147f09670a30cb1b950
MD5 c9392b9f56baee3e0babcd9e80511ad3
BLAKE2b-256 5c976556caf6a0bfc4a182a4769e557b97af5bf373e5ef49a8d9648f2c5f3326

See more details on using hashes here.

File details

Details for the file tow_slack_plog-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tow_slack_plog-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.19.0-32-generic

File hashes

Hashes for tow_slack_plog-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2d813a9c532239aa303855fe88d44a05cd6a5438ad6bd11f9f61b7a275b2685b
MD5 a4f57fb39e2a8c36324fcd7ef7ebb208
BLAKE2b-256 8bc819fa058c60962b0437512d11e01b4b3688bce7fb89ac8c5694afcc212bd0

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