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 asyncio
import logging
import discord_logging
WEBHOOK_URL = "Your webhook url"
logger = logging.getLogger()
handler = discord_logging.Discord_Handler(WEBHOOK_URL)
logger.addHandler(handler)
loop = asyncio.get_event_loop()
async def main():
logging.info('info')
logging.debug('debug')
logging.error('error')
logging.warning('warning')
logging.critical('critical')
print("hello world!")
if __name__ == "__main__":
loop.create_task(main())
loop.run_forever()
Project details
Release history Release notifications | RSS feed
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-0.1.1.tar.gz
(2.2 kB
view details)
Built Distribution
File details
Details for the file discord_logging-0.1.1.tar.gz
.
File metadata
- Download URL: discord_logging-0.1.1.tar.gz
- Upload date:
- Size: 2.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8fa5743e1d71c6778063518006186c94e732b99b5516c2d0b95064bd88fe272 |
|
MD5 | 4abf63795356c79ae9a718b12bcddc7c |
|
BLAKE2b-256 | f89642ddfa913ff2c4d7bdac8552c9d834c904c626c1813f3d899f4813694060 |
Provenance
File details
Details for the file discord_logging-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: discord_logging-0.1.1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8a29a9accaa05dab18376e9e546910a4539e5e848342cb69618ff1972de6325 |
|
MD5 | f3ab545a4b80147213140e48472b75d7 |
|
BLAKE2b-256 | 0f26c85701a10ca0a29329fee2ce3da3dac379985ef741167f95112ad0f4915b |