KLog
KLog is a library which aims to bring easy logging in Python
Installation
pip install KLogLib
Features
- Create Log folder/file
- Specify max log size (MB)
- Zip and save 'N' last log files
Usage
First of all, we have to import the library
from KLog.KLog import KLog
Once we have imported it, we have to initialize the library
def init_log():
logModel = KLog.__new__(KLog)
logModel.__init__(folder='Logs/', log_name='log.log', max_size=50, is_zip=True, max_zip=10)
- folder: Path where the log file will be created.
- log_name: Name of the log file to be created.
- max_size: Maximum size of log files (MB)
- is_zip: Allow to create .zip files to save a backup of the log files.
- max_zip: Maximum .zip files.
The only thing left is to use the library
logModel.write(where='MainApplication', msg='Let`s logging', severity=KLog.LogSeverity.DEBUG)
- where: Method from where we are writing the log line.
- msg: Message that we want to be written in the log file.
- severity: Log line type, can be one of those:
-
Example of deleting zips
Metadata
Release files for KLogLib 0.2.0
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 | Actions |
|---|---|---|---|---|
| KLogLib-0.2.0.tar.gz | 4.8 kB | Without provenance | Details for KLogLib-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| KLogLib-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for KLogLib-0.2.0-py3-none-any.whl |
Total release size: 10.4 kB
Release files / KLogLib-0.2.0.tar.gz
| Download URL | KLogLib-0.2.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c24c9962e18d0fdab106853e9015c40eb46d5103c67bc9ba36f7d1a164548d96
|
|
BLAKE2b-256 checksum How to use checksums |
602edc51fa66258ae39b94dec212567fca1e5dd1724c4c9574aefa2a0ff00f3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / KLogLib-0.2.0-py3-none-any.whl
| Download URL | KLogLib-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff840ebded8cff7df20bea4d362c4df26f2d6f57bf72000785c65018993a16bf
|
|
BLAKE2b-256 checksum How to use checksums |
73ff9ed6f08806ff5900c1151b7de20e4a821c9044d77527e795d4f532f88fc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for KLogLib 0.2.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.