simple log configuration
Project description
pysimple-Log
概要
使用 logging 进行封装了一下 日志格式进行封装, 同时使用 concurrent_log_handler 来完成多进程安全的写日志
安装
Install and update using pip:
pip install pysimple-log
快速开始
from simplelog import logger
logger.info("this is test")
logger.error("this is test")
定制化logger
import logging
from simplelog import Logger
log = Logger(name='test',filename='app.log',level=logging.DEBUG)
logger = log.get_logger()
logger.debug("this is test")
logger.warning("this is test")
logger.info("this is test")
logger.error("this is test")
logger.exception("this is test")
结果如下:
[2020-03-06 22:53:57 WARNING/33060] test <input>:<module>:9 this is test
[2020-03-06 22:53:57 INFO/33060] test <input>:<module>:10 this is test
[2020-03-06 22:53:57 ERROR/33060] test <input>:<module>:11 this is test
[2020-03-06 22:53:57 ERROR/33060] test <input>:<module>:12 this is test
NoneType: None
贡献
如果你对这个项目感兴趣,非常欢迎可以一起维护这个项目。 如果你在使用的过程发现什么问题,可以联系我。
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
pysimple-log-0.0.2.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file pysimple-log-0.0.2.tar.gz
.
File metadata
- Download URL: pysimple-log-0.0.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
9f2ce06481b3db65b1032b8d7ef94ab2f60e14ffde7e95f79557ebab4247c438
|
|
MD5 |
48638d3804a40db6a124b14633705c9b
|
|
BLAKE2b-256 |
0b2391e1adb5f9bb0bc9ecbec630d2b9395fec84b067bbd241efdf901e169c61
|
File details
Details for the file pysimple_log-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pysimple_log-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7c695ce4f368f097472a869de9dc3f1125e17b66b970e99289561bc4733c427d
|
|
MD5 |
923630b7e35fdb64cd785022d73aadba
|
|
BLAKE2b-256 |
47d47548f616527be8fbb39d5996548de47c06959928f570fa33a3d88393dc50
|