A log aid for you.
Project description
LogAid
A log aid for you.
Installation
pip install logaid
Usage
just print
from logaid import log
log.info('hello world')
log.warning('hello world')
log.error('hello world')
log.fatal('hello world',123,{},[],False)
or
import logaid
logaid.info('hello world')
logaid.warning('hello world')
logaid.error('hello world')
logaid.fatal('hello world',123,{},[],False)
open super print
from logaid import log
log.init(print_pro=True)
print("Hello World")
auto_save
from logaid import log
log.init(level='DEBUG',save=True)
log.info('hello world')
save as filename and not print
from logaid import log
log.init(level='DEBUG',filename='test.log',show=False)
log.info('hello world')
define format
from logaid import log
log.init(level='INFO',format='%(asctime)s %(levelname)s %(pathname)s %(lineno)d: %(message)s')
log.info('hello world')
define color
from logaid import log
color = {
'DEBUG':'gray',
'INFO':'green',
'WARNING':'yellow',
'ERROR':'red',
'FATAL':'violet',
}
log.init(level='DEBUG',color=color)
log.debug('hello world')
log.info('hello world')
log.warning('hello world')
log.error('hello world')
log.fatal('hello world',123,{},[],False)
send email
from logaid import log
mailer = {
'host': 'smtp.qq.com',
'token': 'xxxxxxxxxxxx', # IMAP/SMTP code
'nickname':'LogAid',
'sender': 'xxxxxx@qq.com',
'receivers': ['xxxxxx@qq.com'],
'subject': 'A log aid for you.',
'open_level': ['ERROR','FATAL'] # More than WARNING valid.
}
log.init(level='ERROR',mailer=mailer)
log.error('Exec appear error.')
log.email('Send email tip.')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
logaid-1.3.3.tar.gz
(4.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file logaid-1.3.3.tar.gz.
File metadata
- Download URL: logaid-1.3.3.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
191715f589ae0c532d63fb2006aa3dd704e71002483c7d6a960523b3746b9e98
|
|
| MD5 |
2fcc09e72dd4d00baec997d802753662
|
|
| BLAKE2b-256 |
334ae11133698e9868d7d514d96915df02eac80d26e4b7612ab984482cc48ae0
|
File details
Details for the file logaid-1.3.3-py3-none-any.whl.
File metadata
- Download URL: logaid-1.3.3-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
956310cb54968fd71a0e3cb48c52c72dcfe85a551130ab52b46db159734b4f7e
|
|
| MD5 |
044b41990c027cb69270e6f33d2014cd
|
|
| BLAKE2b-256 |
b4dd3f08eb569cae5ffc0539f1121a86b7e8344499ac867eab9add1bd0cf63ff
|