Skip to main content

Automatically log function input, output, execution time, and exceptions.

Project description

autopylog

🔍 autopylog is a simple, lightweight Python package that automatically logs function calls, input arguments, return values, execution time, and exceptions using a single decorator.


🚀 Features

  • ✅ Log function name and arguments
  • ✅ Log return values
  • ✅ Measure and log execution time
  • ✅ Catch and log exceptions
  • ✅ Clean decorator-based syntax
  • ✅ Plug-and-play (no setup required)

📦 Installation

pip install autopylog
🧠 Usage


from autopylog import log_this

@log_this
def divide(x, y):
    return x / y

divide(10, 2)
divide(10, 0)  # Will log the exception
🧾 Output



[INFO] Calling: divide(x=10, y=2)
[INFO] Returned: 5.0 in 0.0001s

[INFO] Calling: divide(x=10, y=0)
[ERROR] Exception in divide: division by zero



🧩 Why autopylog?
Many developers forget or ignore logging  autopylog makes it automatic and painless. Ideal for debugging, tracing, and monitoring Python functions in any project.

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

autopylog-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

autopylog-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file autopylog-0.1.0.tar.gz.

File metadata

  • Download URL: autopylog-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for autopylog-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cb2f9e6baef0d705a8d3a49b145bfb587885345b7f02d9384873d19d3bd91fb3
MD5 4187292e433dffba2205add6b8b19bb5
BLAKE2b-256 108c5e7ef03e1fd3d88f85e16d6f739d30d4cf1beba037ba3c306372d83fc6c7

See more details on using hashes here.

File details

Details for the file autopylog-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: autopylog-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for autopylog-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6629e56377250913ef0348576d9cb9cdd24783db9a90726500148cd6d2db172c
MD5 fccc1879b5f78f8dc5655d2d1ce4f2c5
BLAKE2b-256 682cc4dea73f294d8dd571c9303368805c3f0ae009394b7be681051730c28c25

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