Skip to main content

Load module, function from string

Project description

Do not use print for debugging and delete print for release

Example Usage

from printDebugging import *
setLevel(DEBUG) # or setLevel("DEBUG")
debug("hi")     # printed out
setLevel(QUIET) # set debug level into QUIET
debug("hi")     # not printed out

setLevel(INFO)
set_prefixes("{trace}", INFO)   # Add prefix into INFO
info("HI")                      # FileName with Line number is printed out as prefix
import datetime
set_prefixes(datetime.datetime.now)
info("hello")                   # Result of `datetime.datetime.now()` is printed out as prefix

Debug Level

  • QUIET : DO NOT PRINT EXCEPT “error”

  • INFO : Print info and error

  • VERBOSE : Print info, warn and error

  • DEBUG : print info, warn, error and debug

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

print_debugging-0.0.1.tar.gz (4.0 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