Skip to main content

Structured drop-in extensions for Python's built-in exceptions and warnings. Formatted output, GDPR-safe production mode, hookable logging, zero boilerplate.

Project description

import ladon_clear_exceptions_n_warnings as ladon

class MiniLogger:

@classmethod
def warning(cls, multiline_string):
    print("warn")
    print(multiline_string)

@classmethod
def error(cls, multiline_string):
    print("warn")
    print(multiline_string)

def warn_hook(warn_object): print(warn_object) print("We hooked a warning...")

def exception_hook(exception_object, is_oop_exception): print(is_oop_exception) print(exception_object) print("We hooked a exception!")

ladon.ConfigManager.set_logger(MiniLogger)

ladon.ConfigManager.enable_log_warning() ladon.ConfigManager.enable_auto_log_exceptions()

ladon.ConfigManager.suppress_warning()

ladon.ConfigManager.set_exceptions_hook_function(exception_hook) ladon.ConfigManager.set_warnings_hook_function(warn_hook) ladon.ConfigManager.set_number_of_prior_warning_code_lines(5)

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

ladon_clear_exceptions_n_warnings-1.3.0.tar.gz (297.9 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file ladon_clear_exceptions_n_warnings-1.3.0.tar.gz.

File metadata

File hashes

Hashes for ladon_clear_exceptions_n_warnings-1.3.0.tar.gz
Algorithm Hash digest
SHA256 3effda4581983b0227b692c5b599cb4ffdef83871f22c354121004dd0ee53b7e
MD5 977a6de147d7660b32c5d76d08d4d6a2
BLAKE2b-256 1ba4ec12e408a34456ca7a6d4bd863569e798049db1c85c0d17580a7e8f21cf3

See more details on using hashes here.

File details

Details for the file ladon_clear_exceptions_n_warnings-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ladon_clear_exceptions_n_warnings-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d973b66bd775e4d30ea0eb0b192009fb0b59f52499e58e045aa62e03a626229e
MD5 aaa6b24502d8cea458b304e20c447b3b
BLAKE2b-256 e2b20ae19c9ce14446c9431c1cf9b9d4d689b454feab528df2fecea93774f4dc

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