Print and save a simple log to a file
Project description
ykenan_log
Print and save a simple log to a file
This is a simple log package. You can see Github-ykenan_log
add requirements.txt
python -m pip install -r requirements.txt
py -m build
py -m twine upload --repository testpypi dist/*
Use
install
pip install coloredlogs
pip install ykenan_log
use
# -*- coding: utf-8 -*-
import ykenan_log
logger = ykenan_log.Logger("name", "log")
if __name__ == '__main__':
print("run...")
logger.debug("info......")
logger.info("info......")
logger.warn("info......")
logger.error("info......")
output
run...
2023-03-17 09:21:36 root name[34768] DEBUG info......
2023-03-17 09:21:36 root name[34768] INFO info......
2023-03-17 09:21:36 root name[34768] WARNING info......
2023-03-17 09:21:36 root name[34768] ERROR info......
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
ykenan_log-0.1.0.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for ykenan_log-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e54196f25bf4eeaac49a51dfa55bbb7577c3631008618ef4a089ee5a58e6708d |
|
MD5 | 230ab9b6a1a2d3757eb5949bc31b7062 |
|
BLAKE2b-256 | cc6c55826a9c5f5fa8d974716e4c7404eee2bae096d64064b3be7b0527c10c50 |