Skip to main content

This is a Python package that provides decorators for logging function execution and timing function execution.

Project description

Function Logger and Timer

This is a Python package that provides decorators for logging function execution and timing function execution.

Installation

You can install the package using pip: 'pip install log_exc_decorator'

Usage

Logging function execution

To log function execution, use the elog decorator. Here's an example:

from log_exc_decorator import elog

@elog
def my_function():
    # your code here
    pass

This will log the start and end of my_function, as well as any exceptions that may occur.

Timing function execution

To time function execution, use the timeit decorator. Here's an example:

from log_exc_decorator import timeit

@timeit
def my_function():
    # your code here
    pass

This will time how long it takes to execute my_function and log the elapsed time.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Apache

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

elog_thiago1080-0.0.5.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

elog_thiago1080-0.0.5-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file elog_thiago1080-0.0.5.tar.gz.

File metadata

  • Download URL: elog_thiago1080-0.0.5.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.3

File hashes

Hashes for elog_thiago1080-0.0.5.tar.gz
Algorithm Hash digest
SHA256 65abc834866535d0153f0959eefbc763ce5207027bbf1244f71d65d3975eecc2
MD5 9161faf5fa4c2aebc88e29bf6697fe2a
BLAKE2b-256 9417eab54d34acdd5eea6a2f5c068373e0e044c940223875cb52d36fb993b834

See more details on using hashes here.

File details

Details for the file elog_thiago1080-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for elog_thiago1080-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 22b26f07937c42f3e8319a73ee3161256596244cca4a8a8c927ff34cde58b179
MD5 2d15f209d56ae73a1111584afed80fdb
BLAKE2b-256 572331410574bf023c8e425f9c031ee9c50c1667845f7069921ab4c8c18ef4cb

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