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.

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-3.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-3.0.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: loggingkit-3.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-3.0.0.tar.gz
Algorithm Hash digest
SHA256 5aca6ac00e6a9fff2089a2d8e7b42998468668b17149b565f34a9c970aa6c60b
MD5 00024127c7cd823d177f9b3445a673f7
BLAKE2b-256 fcf5acdb876c0505d82b9d81d3da3b38016ddd2a9b5c4bf519a1f0803e05e47f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: loggingkit-3.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-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e31dd98a43128f2dd6db3cb5d952e914a750a00667fb743baa2be43f3fbbd3f0
MD5 2b9ffa9d7bb631925f00d2becfe32688
BLAKE2b-256 ae486db4aae4ab13005ea82e72fd58f1ba7336aafa579414c1ad63e4a0b8c084

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