yzm_log
Print and save a simple log to a file
This is a simple log package. You can see Github-yzm_log PyPI-yzm_log
upload
py -m build
twine check dist/*
twine upload dist/*
Use
install
pip install yzm_log
use
# -*- coding: utf-8 -*-
from yzm_log import Logger
log = Logger("name", "log")
if __name__ == '__main__':
print("run...")
log.debug("info......")
log.info("info......")
log.warning("info......")
log.error("info......")
output
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......
Introduction
main function
yzm_log.
Logger(name: str = None,
log_path: str = None,
level: str = "INFO",
is_solitary: bool = True,
is_form_file: bool = False,
size: int = 104857600,
backup_count: int = 10,
encoding: str = "UTF-8"
)
:param name: Project Name
:param log_path: Log file output path. Default is log_%Y%m%d.log.
:param level: Log printing level. Default is INFO.
:param is_solitary: When the file path is consistent (here, the log_path parameter is not a specific file name, but a file path), whether the file is formed independently according to the name parameter. Default is True.
:param is_form_file: Whether to form a log file. Default is False.
:param size: Setting the file size if a file is formed. Default is 104857600. (100MB)
:param backup_count: Setting the number of rotating files if a file is formed. Default is 10.
:param encoding: Setting of file encoding if a file is formed. Default is UTF-8.
Metadata
Release files for yzm-log 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| yzm_log-0.0.2.tar.gz | 5.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yzm_log-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / yzm_log-0.0.2.tar.gz
| Download URL | yzm_log-0.0.2.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f31fe3570d2b7dfe2d0024fb63d3a3a05a5512b09a34b576aa0eb33687654cc
|
|
BLAKE2b-256 checksum How to use checksums |
b275c1d9c7c0fa0ca844330a8e747506aa9d8cc0db791dd30832490fe1292d81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.0
|
Release files / yzm_log-0.0.2-py3-none-any.whl
| Download URL | yzm_log-0.0.2-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30b1747eac936dc06e4558eddd81f16630a3841b7f9f465374e8134c62256323
|
|
BLAKE2b-256 checksum How to use checksums |
4372518452fa765f702e1923fb4af3538173bada72368037d9be298edffcefc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.0
|
Security for yzm-log 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.