Skip to main content

loguru-notification

loguru-notification 是一个日志输出项目,在loguru的基础集成日志输出到控制台、输出到Slack、并结合CMRESHandler把日记记录到ElasticSearch, 更容易的对日志进行分析。

Installation

1.使用python包管理工具pip 进行安装。

pip install loguru-notification

Usage

对loguru-notification进行配置,并输出日志信息。

from configlog.setlogs import Logger

logger = Logger(
    webhook_url='Your Slack webhook URL',  # Slack webhook URL  # noqa
    es_host='172.0.0.1:9200',  # log on ElasticSearch host ip and port
)

if __name__ == '__main__':
    logger.printout('输出到控制台')
    logger.msg('输出到控制台,并写入ElasticSearch')
    logger.notice('输出到控制台和Slack,并写入ElasticSearch')

Contributing

欢迎使用,如果有好的优化方法也欢迎提交修改。

使用前请做适当的测试,以确定跟您的项目完全兼容。

License

MIT

Release files for loguru-notification 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for loguru-notification 0.0.7
File Size Uploaded
loguru-notification-0.0.7.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for loguru-notification 0.0.7
File Interpreter ABI Platform
loguru_notification-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / loguru-notification-0.0.7.tar.gz

Download URL loguru-notification-0.0.7.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f76549fdecb1786d858d57b38ecda3344aff9bf311db836bc74d11401dcc348a
BLAKE2b-256 checksum
How to use checksums
0a8ba6dd34e14474652049f13857f90baf877b56451f8d28da24d88ddb163ffd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

Release files / loguru_notification-0.0.7-py3-none-any.whl

Download URL loguru_notification-0.0.7-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2c18494964b4b09d3a29fca9ef036846dc0a86751e7c37dad1225b288bdb269
BLAKE2b-256 checksum
How to use checksums
6ca0c53bfae1778c807613742c400cd8399bfd9b4c77c8dadaf26aa20c095be2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page