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.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.1.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.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: loggingkit-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 1fd73e3685edd97d5640101e8c503489ef0a9f33eed91acc104ed4d1b2d2b705
MD5 d204ceee141e675bd66ea0e830f4533c
BLAKE2b-256 da606234cac72293042201ae33a20539f90b55bed15a751ade462a5dfb46ae6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: loggingkit-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cda72e9d864a107e60e3de03790c5282ca0721e70fc163133bf5ae7171485524
MD5 d587b983c0654b98338e513fe6e69e9a
BLAKE2b-256 966fa9a74a5737c177be5c608f63982aee6b3ab1e47e82614fef041ac568bfd6

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