Skip to main content

KLog

KLog is a library which aims to bring easy logging in Python

Releases PyPI Releases


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:
    • Warning
    • Warning
    • Warning
    • Warning
    • Warning

Example of deleting zips

https://user-images.githubusercontent.com/17411934/231798446-a4187172-878c-423a-9abd-1cf40e6c58bb.mov

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)

Source distribution for KLogLib 0.2.0
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)

Table of built distributions (wheels) for KLogLib 0.2.0
File Interpreter ABI Platform Actions
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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page