Skip to main content

带发邮件的loguru包装,支持全部loguru功能和邮件发送功能

Project description

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', email=True)
elogger.error('error')
elogger.debug('debug')
elogger.info('info')
elogger.success('success')
# then all the above logs will be sent to the mailbox:'elogger.mail_config.receive_emails'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eloger-0.0.2.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file eloger-0.0.2.tar.gz.

File metadata

  • Download URL: eloger-0.0.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for eloger-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7c1ffa78a4f60c202f21007a6c3a881435a66bdad493eece83a21c490175ff55
MD5 d0d632fbe694bcaafcfed125c2d27285
BLAKE2b-256 110e8192a9959a4552098fe6b62ef33477cc4f83d0e3b689150c3454a9c5cf07

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page