Skip to main content

No project description provided

Project description

Alt text

⚡ quirtylog ⚡

pre-commit Documentation Status

Quick & dirty logging in python.

Installation

To install the package the simplest procedure is:

pip install quirtylog

Now you can test the installation... In a python shell:

import quirtylog

quirtylog.__version__

Installation from source

Once you have cloned the repository

pip install .

To use the develop mode just write pip install -e ..

The file pyproject.toml contains the packages needed for the installation. The code requires python3.11+.

Examples

The package creates custom loggers object.

import quirtylog

log_path = "/path/to/logs"
logger = quirtylog.create_logger(log_path=log_path)

It is also possible to create decorators to be used in a user-defined function.

import quirtylog


@quirtylog.measure_time(logger)
def f(x):
    """A function that do nothing"""
    return x


@quirtylog.measure_time(logger)
def g(x):
    """A function that raise an exception"""
    return x / 0.

It can also be used as a wrapper for external scripts

python -m quirtylog main.py

For further examples see the folder examples.

Contributing

If you want to contribute to this project, please follow the guidelines in the CONTRIBUTING.md.

Official soundtrack

Jhonny Cash - The Frozen Logger

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

quirtylog-0.6.0.tar.gz (48.2 kB view details)

Uploaded Source

Built Distribution

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

quirtylog-0.6.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file quirtylog-0.6.0.tar.gz.

File metadata

  • Download URL: quirtylog-0.6.0.tar.gz
  • Upload date:
  • Size: 48.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for quirtylog-0.6.0.tar.gz
Algorithm Hash digest
SHA256 e27da5579da294f38c8b3c623a65d73e137902ff0707aac47b3630ab93403b31
MD5 ba974f9f7ba40d185c77659bb271ecba
BLAKE2b-256 cad4573e98edb900be1e050d0d469da69cb5aa98bed76d762b9eb5c7ee7b1ec8

See more details on using hashes here.

File details

Details for the file quirtylog-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: quirtylog-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for quirtylog-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70f5e11e0f8879b4395207f49b56e2dd06761f7a73adbe72413e48ec153c2c15
MD5 80544415323672a9683c1381c5c47cde
BLAKE2b-256 d25b65d96185fcb35d883384ea60fd56c263b723b4379e26f2dd3db1b8d16bf1

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