Metadata-Version: 2.1
Name: loguru-notification
Version: 0.0.2
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 (==5.0.2)
Requires-Dist: attrs (==20.3.0)
Requires-Dist: billiard (==3.6.3.0)
Requires-Dist: celery (==5.0.2)
Requires-Dist: certifi (==2020.11.8)
Requires-Dist: chardet (==3.0.4)
Requires-Dist: click (==7.1.2)
Requires-Dist: click-didyoumean (==0.0.3)
Requires-Dist: click-repl (==0.1.6)
Requires-Dist: CMRESHandler2 (==2.0.4)
Requires-Dist: elasticsearch (==7.10.0)
Requires-Dist: idna (==2.10)
Requires-Dist: jsonschema (==3.2.0)
Requires-Dist: kombu (==5.0.2)
Requires-Dist: loguru (==0.5.3)
Requires-Dist: notifiers (==1.2.1)
Requires-Dist: prompt-toolkit (==3.0.8)
Requires-Dist: pyrsistent (==0.17.3)
Requires-Dist: pytz (==2020.4)
Requires-Dist: redis (==3.5.3)
Requires-Dist: requests (==2.25.0)
Requires-Dist: rfc3987 (==1.3.8)
Requires-Dist: sentry-sdk (==0.19.4)
Requires-Dist: six (==1.15.0)
Requires-Dist: tornado (==6.1)
Requires-Dist: urllib3 (==1.26.2)
Requires-Dist: vine (==5.0.0)
Requires-Dist: wcwidth (==0.2.5)

# 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 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/)

