Name | tlssysloghandler JSON |
Version |
1.0.3
JSON |
| download |
home_page | |
Summary | SysLogHandler with TLS |
upload_time | 2023-12-13 15:16:27 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.11 |
license | ISC |
keywords |
handler
logging
logger
syslog
tls
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
======================
SysLogHandler with TLS
======================
Python logging.handler as a drop-in replacement for logging.SysLogHandler with support for sending syslog messages over TCP with TLS.
Installation
------------
.. code:: bash
pip install tlssysloghandler
Usage
-----
.. code:: python
import logging
from tlssysloghandler import TLSSysLogHandler
logger = logging.getLogger()
logger.setLevel(logging.INFO)
# with default system certificate store
handler1 = TLSSysLogHandler(address=('secure-logging.example.com', 6514),
socktype=socket.SOCK_STREAM,
secure=True)
logger.addHandler(handler1)
# with custom certificates, via cafile/capath/cadata
# refer to https://docs.python.org/3/library/ssl.html#ssl.create_default_context
handler2 = TLSSysLogHandler(address=('secure-logging.example.com', 6514),
socktype=socket.SOCK_STREAM,
secure={cafile='/path/to/ca/file'})
logger.addHandler(handler2)
# with custom SSLContext
context = ssl.create_default_context(cafile='/path/to/ca/file')
handler3 = TLSSysLogHandler(address=('secure-logging.example.com', 6514),
socktype=socket.SOCK_STREAM,
secure=context)
logger.addHandler(handler3)
# or allow TLS without verification
handler4 = TLSSysLogHandler(address=('secure-logging.example.com', 6514),
socktype=socket.SOCK_STREAM,
secure="noverify")
logger.addHandler(handler4)
logger.info('Hello World!')
Raw data
{
"_id": null,
"home_page": "",
"name": "tlssysloghandler",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "",
"keywords": "handler,logging,logger,syslog,tls",
"author": "",
"author_email": "A Tammy <atammy@bsd.ac>, Craig Weber <crgwbr@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/62/8c/119d65539e4fba0df0a324fd097ae693e85216227e22a6bdf3de8dd71f11/tlssysloghandler-1.0.3.tar.gz",
"platform": null,
"description": "======================\nSysLogHandler with TLS\n======================\n\nPython logging.handler as a drop-in replacement for logging.SysLogHandler with support for sending syslog messages over TCP with TLS.\n\nInstallation\n------------\n\n.. code:: bash\n\n pip install tlssysloghandler\n\n\nUsage\n-----\n\n.. code:: python\n\n import logging\n from tlssysloghandler import TLSSysLogHandler\n\n logger = logging.getLogger()\n logger.setLevel(logging.INFO)\n\n # with default system certificate store\n handler1 = TLSSysLogHandler(address=('secure-logging.example.com', 6514),\n socktype=socket.SOCK_STREAM,\n secure=True)\n logger.addHandler(handler1)\n\n # with custom certificates, via cafile/capath/cadata\n # refer to https://docs.python.org/3/library/ssl.html#ssl.create_default_context\n handler2 = TLSSysLogHandler(address=('secure-logging.example.com', 6514), \n socktype=socket.SOCK_STREAM,\n secure={cafile='/path/to/ca/file'})\n logger.addHandler(handler2)\n\n # with custom SSLContext\n context = ssl.create_default_context(cafile='/path/to/ca/file')\n handler3 = TLSSysLogHandler(address=('secure-logging.example.com', 6514), \n socktype=socket.SOCK_STREAM,\n secure=context)\n logger.addHandler(handler3)\n\n # or allow TLS without verification\n handler4 = TLSSysLogHandler(address=('secure-logging.example.com', 6514), \n socktype=socket.SOCK_STREAM,\n secure=\"noverify\")\n logger.addHandler(handler4)\n\n logger.info('Hello World!')\n",
"bugtrack_url": null,
"license": "ISC",
"summary": "SysLogHandler with TLS",
"version": "1.0.3",
"project_urls": {
"License": "https://github.com/bsd-ac/tlssysloghandler/blob/main/LICENSE",
"Repository": "https://github.com/bsd-ac/tlssysloghandler"
},
"split_keywords": [
"handler",
"logging",
"logger",
"syslog",
"tls"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "36cc80bee485539f0bccce4d9a3b97062f22da4ba4a0f07ea0cf74de4db6f8de",
"md5": "39ad67f268fbbe838e970573046a9530",
"sha256": "79f846839df8bd1ccc0a5b42dbd53b4aa4b799c5ace4215fb016be4950c147b5"
},
"downloads": -1,
"filename": "tlssysloghandler-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "39ad67f268fbbe838e970573046a9530",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 3963,
"upload_time": "2023-12-13T15:16:25",
"upload_time_iso_8601": "2023-12-13T15:16:25.723450Z",
"url": "https://files.pythonhosted.org/packages/36/cc/80bee485539f0bccce4d9a3b97062f22da4ba4a0f07ea0cf74de4db6f8de/tlssysloghandler-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "628c119d65539e4fba0df0a324fd097ae693e85216227e22a6bdf3de8dd71f11",
"md5": "263f3b992ee55d698f9e9f76e6bf97a4",
"sha256": "302c136a373a814d1cf8eb680b5772d3c98ebf2bdfe17f5b007c26b25dbb56a2"
},
"downloads": -1,
"filename": "tlssysloghandler-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "263f3b992ee55d698f9e9f76e6bf97a4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 6665,
"upload_time": "2023-12-13T15:16:27",
"upload_time_iso_8601": "2023-12-13T15:16:27.201053Z",
"url": "https://files.pythonhosted.org/packages/62/8c/119d65539e4fba0df0a324fd097ae693e85216227e22a6bdf3de8dd71f11/tlssysloghandler-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-13 15:16:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bsd-ac",
"github_project": "tlssysloghandler",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "tlssysloghandler"
}