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.7.0.tar.gz (47.7 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.7.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quirtylog-0.7.0.tar.gz
  • Upload date:
  • Size: 47.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quirtylog-0.7.0.tar.gz
Algorithm Hash digest
SHA256 f32de585a12674ef729dd07c6eeb667b5629c42370e80c1336f0b3ce0f12a28f
MD5 d4adc28c8a5a5ca1849004d648c374df
BLAKE2b-256 f7ae709c4cc623c7257baaeddae6fa0248625af08d666a8a8d27512b8c5ef0c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quirtylog-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quirtylog-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a98c3ea9f6332916af93efd6d10a92af91a33b46adda17c71b15eae76a57e5dd
MD5 fcea7aed9dd21d5afeae0faf2d14d7e0
BLAKE2b-256 fb919a3051184a9b4098ea2032a170e69ffe0a99ff5c057cff9b0f91429ed8a8

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