Skip to main content

Captures and logs exceptions, optionally printing them to stderr.

Tested against Windows 10 / Python 3.10 / Anaconda

pip install pfehler

Capture and log exceptions, optionally printing them to stderr.

Args:
	logfile (str, optional): The path to the error log file where the exception details
		will be appended. If not provided, no logging to a file will occur.
	print_error (bool, optional): If True, the exception details will be printed to stderr.
		If False, no output will be printed. Defaults to True.

Example:
	from pfehler import pfehler
	try:
		x = 5 / 0
	except Exception:
		pfehler(logfile="c:\\errorlogfile.txt", print_error=True)

This function captures an exception's traceback, optionally prints it to stderr, and
appends the error details along with a timestamp to a specified log file. If the log file
does not exist, it will be created. The timestamp format is "YYYY_MM_DD_HH_MM_SS_microseconds".

Metadata

Release files for pfehler 0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pfehler 0.10
File Size Uploaded Provenance Actions
pfehler-0.10.tar.gz 3.6 kB Without provenance Details for pfehler-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pfehler 0.10
File Interpreter ABI Platform Actions
pfehler-0.10-py3-none-any.whl Python 3 none any Details for pfehler-0.10-py3-none-any.whl

Total release size: 8.9 kB

Release files / pfehler-0.10.tar.gz

Download URL pfehler-0.10.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fe48bc644718ece2c263e0f91fae504fff12d5061a4048363f5cd1d41b9d0bc2
BLAKE2b-256 checksum
How to use checksums
ad1a9b7f071d310d4d076f2cd0b316037e29c527212fdfd59ff47178d654ff7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / pfehler-0.10-py3-none-any.whl

Download URL pfehler-0.10-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da5f41e52cbb3e8c9d6a87904cc970f24594013a5f3317695938649f7f709e90
BLAKE2b-256 checksum
How to use checksums
a94d8c0a1d1443629669dc586d97ba8320a4373cd427fdad3d00d86bf178ab16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for pfehler 0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page