Skip to main content

No project description provided

Project description

Log N Write

Log function executions and variables. Output to stdout.

Example

Use log_function decorator to log functions and log_variable to log values.

from lognwrite.log_to_out import LogToOut

@LogToOut.log_function
def addition(a, b):
    LogToOut.log_variable(a, "a")
    LogToOut.log_variable(b, "b")
    return a + b

addition(3, 50)

Executing the example will output:

malifpy@malifpy:~$ python main.py
+ addition( 3, 50 )
  a = 3
  b = 50
- addition -> 53

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

lognwrite-0.1.3.tar.gz (3.2 kB view hashes)

Uploaded Source

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