Metadata-Version: 2.1
Name: loguru-notification
Version: 0.0.6
Summary: Project logging printout
Home-page: https://github.com/supplayer/loguru-notification
Author: RoyXing
Author-email: x254724521@hotmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: amqp
Requires-Dist: attrs
Requires-Dist: billiard
Requires-Dist: celery
Requires-Dist: certifi
Requires-Dist: chardet
Requires-Dist: click
Requires-Dist: click-didyoumean
Requires-Dist: click-repl
Requires-Dist: CMRESHandler2
Requires-Dist: elasticsearch
Requires-Dist: idna
Requires-Dist: jsonschema
Requires-Dist: kombu
Requires-Dist: loguru
Requires-Dist: notifiers
Requires-Dist: prompt-toolkit
Requires-Dist: pyrsistent
Requires-Dist: pytz
Requires-Dist: redis
Requires-Dist: requests
Requires-Dist: rfc3987
Requires-Dist: sentry-sdk
Requires-Dist: six
Requires-Dist: tornado
Requires-Dist: urllib3
Requires-Dist: vine
Requires-Dist: wcwidth

# loguru-notification

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

## Installation

1.使用python包管理工具[pip](https://pypi.org/project/loguru-notification/) 进行安装。

```bash
pip install loguru-notification
```

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

```python
from configlog.setlogs import Logger

logger = Logger(
    dsn='Your Sentry URL',  # Sentry dsn URL
    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](https://choosealicense.com/licenses/mit/)

