Skip to main content

No project description provided

Project description

Alt text

⚡ quirtylog ⚡

pre-commit

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.4.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

quirtylog-0.4.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quirtylog-0.4.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for quirtylog-0.4.0.tar.gz
Algorithm Hash digest
SHA256 be7573719016f27428c98817d33d47c2d2b1e0a64e5e2ccbf53e1d83f544302f
MD5 8f856b9b37b18fd4ccd72ab46123b0e7
BLAKE2b-256 d81371051ffb12ecad3ef589412cf6cbff98ce07f239f14cbbcdd41b89e6c6c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quirtylog-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for quirtylog-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8f16cae3f7f167d91b22b90fb6384889913c759e5c107b5eef4fac160169e94
MD5 95c751f237ed144346ac411e3d8bc063
BLAKE2b-256 b0a20e908ffd6d9683bb34b3f54d90235435b3501fc8a66a986e869132fb2b54

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page