Skip to main content

A simple Python logging utility

Project description

LoggingKit

A simple Python logging utility

Installation

pip install loggingkit

Importing

import loggingkit

Usage

Just as an example, we will use this code:

log1 = loggingkit.Logger()

create_log()

The function create_log() takes one argument: the name of the log. It creates a new log

log1.log("test")

warning()

The function warning() takes one argument and one * argument: the name of the log you want the warning in and the warning, which is the * argument. It creates the specified warning in the specified log.

log1.warning("test",  "This is a warning", "line 21")

info()

The function info() takes one argument and one * argument: the name of the log you want the info in and the info, which is the * argument. It creates the specified info in the specified log.

log1.info("test", "This is an info", "line 21")

error()

The function error() takes one argument and one * argument: the name of the log you want the error in and the error, which is the * argument. It creates the specified error in the specified log.

log1.error("test", "This is an error", "Line 21")

plain()

The function plain() takes one argument and one * argument: the name of the log you want the note in and the note, which is the * argument. It creates the specified plain note in the specified log with no W, I or E tags.

log1.plain("test", "This is a note", "Line 21")

clear()

The function clear() takes one argument: the name of the log you want to clear. It deletes all entries of the specified log.

log1.clear("test")

return_log()

log1.return_log("test")

save_log()

The function save_log() takes one argument which has a default, log.json: the name of the file you want to export the logs into. (With the extension!) It exports the set of logs into the specified filename.

log1.save_log() #The default will be used here

open_log()

The function open_log() takes one argument, which has a default, log.json: The name of the file you want to import the logs from. (Also with the extension!) It imports the logs from the specified filename.

log1.open_log() #The default will be used here as well

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

loggingkit-4.0.0.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

loggingkit-4.0.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file loggingkit-4.0.0.tar.gz.

File metadata

  • Download URL: loggingkit-4.0.0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for loggingkit-4.0.0.tar.gz
Algorithm Hash digest
SHA256 2b9b4134de0e435fbc54758b9538f718a5443bf99ca99b5953dca691234a0c84
MD5 5167a6ae75c44a022f879bdda3f8a9a5
BLAKE2b-256 9e8af1fd5f28041b4e981dbdc772716405d0f65417982af72e4aaf92568e6886

See more details on using hashes here.

File details

Details for the file loggingkit-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: loggingkit-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for loggingkit-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3788fd8d37b4af9a49fa82b757715d134af4fe039badf70982a9500236edd2c5
MD5 107c7ad38cf11e36795136086fa8c34e
BLAKE2b-256 13a9c9387ed3cb378079218174c1eacea1cc180f487af2864a9ef2c74409c13f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page