Skip to main content

A simple Python logging utility

Project description

LoggingKit

A simple Python logging utility

Installation

pip install loggerkit

Importing

import loggerkit

Usage

Just as an example, we will use this code:

log1 = loggerkit.Log()

create_log()

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

log1.log("test")

warning()

The function warning() takes two arguments: the name of the log you want the warning in and the warning. It creates the specified warning in the specified log.

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

info()

The function info() takes two arguments: the name of the log you want the info in and the info. It creates the specified info in the specified log.

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

error()

The function error() takes two arguments: the name of the log you want the error in and the error. It creates the specified error in the specified log.

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

return_log()

The function return_log() takes one argument: the name of the log you want it to return. It returns the contents of the specified 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-1.0.0.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

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

loggingkit-1.0.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for loggingkit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 feed75351f2f5bbd87f33e05ee2aea94dc6d1bacf120b8805e82e3d6e64d8c31
MD5 ee3e6d1d117c6a38a4fc372e41428171
BLAKE2b-256 5e1238540f73334e42beba2b9e5910600075920876698db64d68afac18f22e5e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for loggingkit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1963fb556dca95daa1d307f300f78724765f13c95e321b3d94f6a51a3a245a7b
MD5 7c622bdfd38642095e0450c0374531fa
BLAKE2b-256 8ddc387aef6a6a6a70931c3e27045c7f00a2b099483c8e436960a706710fe441

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