Skip to main content

ezpylogger: Log easier and simpler

Project description

ezpylogger: Logging made simpler


What is this?

This is an easy to use, logging library that can log function calls of ANY functions!
This includes functions that you've made, functions that have been predefined. (Like any functions/methods that are included in other libraries)

How do you use this?

Simple, just import the ezpylogger module and use the Logger to log function calls.
Example:

from ezpylogger import Logger
from time import sleep

@Logger()
def add(a, b):
    return a + b

class Mul:
    logger = Logger()

    def __init__(self):
        pass

    @logger
    def __call__(self, *args, **kwargs):
        numbers = [ arg if arg.__class__.__name__ == 'int' or arg.__class__.__name__ == 'float' else 1 for arg in args ]
        rv = [1]
        for number in numbers:
            rv[0] *= number

        # Some very heavy computational task
        self.logger(sleep)(30)

        return rv + numbers

seven = add(3, 4)
prod = Mul()(1, 2, 3, 4, 5, 6, 7, 0.08, 0.69, 4.20)

Installation

python3 -m pip install ezpylogger

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

ezpylogger-0.1.3.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

ezpylogger-0.1.3-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file ezpylogger-0.1.3.tar.gz.

File metadata

  • Download URL: ezpylogger-0.1.3.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for ezpylogger-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c6b406120b84e92d67be087965eddfe7c8ff8de452e2b6448b463384baa3acdd
MD5 a0588379f9e984117ca2e0dcbdf141fd
BLAKE2b-256 fa6860ed8b625a493bcdcab3f7833693f373fde7b759d650478885a60f720c2e

See more details on using hashes here.

File details

Details for the file ezpylogger-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ezpylogger-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for ezpylogger-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1c540c863a14521d32383835896411e5151b849376a84e15790b7594da442c60
MD5 edfdd49f78717899f0897a405e86865c
BLAKE2b-256 0f758f6b475db8c07e8bcf36688a21949b92de9d95b4336204e8ca1c5934eb2b

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