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)
click jump into code line
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.6.tar.gz
(5.0 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.6.tar.gz.
File metadata
- Download URL: logaid-1.3.6.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f2393ce4e678813e61bf555dfde676197034318b65eba48c173594f4f22b1bc
|
|
| MD5 |
151a466a39257f43dcde6b934ac46e6a
|
|
| BLAKE2b-256 |
10aa2208bc3eb025c79d5c6a616ec1e4f0fdbc37fc5e29d4d3b5f8183cf517f3
|
File details
Details for the file logaid-1.3.6-py3-none-any.whl.
File metadata
- Download URL: logaid-1.3.6-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 |
50f65ba7d629354ebeddab09d709b07ae0d39a72662a1fd4305dad3d3030947d
|
|
| MD5 |
1b307385b313d8c7591dbd0427023c1d
|
|
| BLAKE2b-256 |
436da2d9e5568b30ea56497a0c11565130ee5089486d975ce96600925f541bad
|