Skip to main content

Transfer logs acquired by logging module to discord with webhook!

Project description

discord_logging

discord_logging is a logging extension module.
By using this module, logs can be sent by webhook.

installing

Install and update using pip:

pip install discord_logging

A simple example.

import discord

import logging
import discord_logging

logger = logging.getLogger()

WEBHOOK_URL = "Your webhook url"
handler = discord_logging.Discord_Handler(WEBHOOK_URL)

logger.addHandler(handler)

client = discord.Client()


@client.event
async def on_ready():
    print('login!(\'\')ゞ')


@client.event
async def on_message(message):

    if message.author.bot:
        return
    if message.content == '/hello':
        await message.channel.send('hello')

client.run('THi5IsDuMMyaCCesSTOK3nQ4.Cl2FMQ.ThIsi5DUMMyAcc3s5ToKen7kKWs')

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

discord_logging-1.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

discord_logging-1.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file discord_logging-1.0.tar.gz.

File metadata

  • Download URL: discord_logging-1.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for discord_logging-1.0.tar.gz
Algorithm Hash digest
SHA256 85812a7014665a2ad1252b27832e74d4cfc9c3a540542316223389fbd7df6694
MD5 4788961e084adfda09350f00d7146169
BLAKE2b-256 ce561015ee73d55002d4bff2b49e5adcd90e10e43d44b54f75c3b70d0627effe

See more details on using hashes here.

File details

Details for the file discord_logging-1.0-py3-none-any.whl.

File metadata

  • Download URL: discord_logging-1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for discord_logging-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e59f663f4cb8d0535dfe5905f8dcb8d1c1e44c7ee90a5203d42bad43a31b105
MD5 e2d60343b5def8c3e174b9b1f150dd2d
BLAKE2b-256 6fde18202fb2d1892abb698a70ea7fe2cc583a4e7b67357e0bef613d7b683785

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