pfehler


Namepfehler JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/pfehler
SummaryCaptures and logs exceptions, optionally printing them to stderr
upload_time2023-09-04 21:29:35
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords log exceptions
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Captures and logs exceptions, optionally printing them to stderr.

## Tested against Windows 10 / Python 3.10 / Anaconda

## pip install pfehler

```python
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".
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/pfehler",
    "name": "pfehler",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "log,exceptions",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ad/1a/9b7f071d310d4d076f2cd0b316037e29c527212fdfd59ff47178d654ff7a/pfehler-0.10.tar.gz",
    "platform": null,
    "description": "\r\n# Captures and logs exceptions, optionally printing them to stderr.\r\n\r\n## Tested against Windows 10 / Python 3.10 / Anaconda\r\n\r\n## pip install pfehler\r\n\r\n```python\r\nCapture and log exceptions, optionally printing them to stderr.\r\n\r\nArgs:\r\n\tlogfile (str, optional): The path to the error log file where the exception details\r\n\t\twill be appended. If not provided, no logging to a file will occur.\r\n\tprint_error (bool, optional): If True, the exception details will be printed to stderr.\r\n\t\tIf False, no output will be printed. Defaults to True.\r\n\r\nExample:\r\n\tfrom pfehler import pfehler\r\n\ttry:\r\n\t\tx = 5 / 0\r\n\texcept Exception:\r\n\t\tpfehler(logfile=\"c:\\\\errorlogfile.txt\", print_error=True)\r\n\r\nThis function captures an exception's traceback, optionally prints it to stderr, and\r\nappends the error details along with a timestamp to a specified log file. If the log file\r\ndoes not exist, it will be created. The timestamp format is \"YYYY_MM_DD_HH_MM_SS_microseconds\".\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Captures and logs exceptions, optionally printing them to stderr",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/pfehler"
    },
    "split_keywords": [
        "log",
        "exceptions"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a94d8c0a1d1443629669dc586d97ba8320a4373cd427fdad3d00d86bf178ab16",
                "md5": "0b446638b0621db38cc2fbe9a79368a7",
                "sha256": "da5f41e52cbb3e8c9d6a87904cc970f24594013a5f3317695938649f7f709e90"
            },
            "downloads": -1,
            "filename": "pfehler-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0b446638b0621db38cc2fbe9a79368a7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5248,
            "upload_time": "2023-09-04T21:29:33",
            "upload_time_iso_8601": "2023-09-04T21:29:33.100061Z",
            "url": "https://files.pythonhosted.org/packages/a9/4d/8c0a1d1443629669dc586d97ba8320a4373cd427fdad3d00d86bf178ab16/pfehler-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad1a9b7f071d310d4d076f2cd0b316037e29c527212fdfd59ff47178d654ff7a",
                "md5": "ca3699990d5628161d8a8c7460d1fc9b",
                "sha256": "fe48bc644718ece2c263e0f91fae504fff12d5061a4048363f5cd1d41b9d0bc2"
            },
            "downloads": -1,
            "filename": "pfehler-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "ca3699990d5628161d8a8c7460d1fc9b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3606,
            "upload_time": "2023-09-04T21:29:35",
            "upload_time_iso_8601": "2023-09-04T21:29:35.792575Z",
            "url": "https://files.pythonhosted.org/packages/ad/1a/9b7f071d310d4d076f2cd0b316037e29c527212fdfd59ff47178d654ff7a/pfehler-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-04 21:29:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "pfehler",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pfehler"
}
        
Elapsed time: 0.10886s