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.2.6.tar.gz
(4.8 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.2.6.tar.gz.
File metadata
- Download URL: logaid-1.2.6.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d210db6ef259552bbfff1ff40478eba3713438d1cedf8c21890ec40e44b88ad3
|
|
| MD5 |
1e56276ad2eeefee7d6a70043bdb681e
|
|
| BLAKE2b-256 |
07e0f98cd40d7cb66ffbcc07b08f7ac339027ca79ade25984f9984e1bb9472df
|
File details
Details for the file logaid-1.2.6-py3-none-any.whl.
File metadata
- Download URL: logaid-1.2.6-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d22101362f7456a023cffc1fee2630896ffdfe972c562226cb11aab82713b0e4
|
|
| MD5 |
bb01eb6ae9e05644fcf2ba255f85f209
|
|
| BLAKE2b-256 |
a85c3ef5ac1f64eeb6e26872bcf8f9946737e826b8255988a294b5965fc06372
|