eloguru: email for loguru
带邮件功能的loguru
install
- clone source
git clone https://github.com/425776024/eloger.git
- pip
pip install eloger
des
Loguru with mail function
带邮件功能的loguru
- setting elogger.mail_config , then all operations are the same as loguru
- then all the loguru logs will be sent to the
mailbox:
elogger.mail_config.receive_emails
config mail server
use
from eloger import elogger
elogger.mail_config.sender_email = "Your email"
elogger.mail_config.sender_email_passwd = "Your email Authorization code"
elogger.mail_config.sender_email_mailserver = "Your email server, like: smtp.163.com"
elogger.mail_config.sender_email_mailserver_port = "Your email server's port , like : 25"
elogger.mail_config.title = "Your email message title , like : this is a log message title"
elogger.mail_config.body = "Your email message content template , like : <br/>#msg<br/> (#msg Will be replaced by log message)"
elogger.mail_config.receive_emails = [
"Your email send to Email account 1",
"Your email send to Email account 2",
]
# All operations are the same as loguru
elogger.add('a.log', rotation='50 MB')
elogger.add('a.log')
elogger.error('error', email=True)
elogger.debug('debug')
elogger.info('info')
elogger.success('success', email=True)
# then all the above logs will be sent to the mailbox:'elogger.mail_config.receive_emails'
Metadata
Release files for eloger 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| eloger-0.0.3.tar.gz | 4.9 kB | Details |
Release files / eloger-0.0.3.tar.gz
| Download URL | eloger-0.0.3.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53b51f48012bc558f8e78b078aaebb265378e7108e65a026810e170577b10de2
|
|
BLAKE2b-256 checksum How to use checksums |
c58fec48907edbbcf945b70d17624e592d0bd62acb68ab2582e5b89a48493b1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.9
|