syslog2


Namesyslog2 JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/andy-maier/syslog2
SummaryAn improved SysLogHandler for Python
upload_time2022-09-05 22:39:28
maintainerAndreas Maier
docs_urlNone
authorAndreas Maier
requires_python>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
licenseApache Software License 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            syslog2 - An improved SysLogHandler for Python
==============================================

.. image:: https://badge.fury.io/py/syslog2.svg
    :target: https://pypi.python.org/pypi/syslog2/
    :alt: Version on Pypi

.. image:: https://github.com/andy-maier/syslog2/workflows/test/badge.svg?branch=master
    :target: https://github.com/andy-maier/syslog2/actions/
    :alt: Actions status

.. image:: https://readthedocs.org/projects/syslog2/badge/?version=latest
    :target: https://readthedocs.org/projects/syslog2/builds/
    :alt: Docs build status (master)

.. image:: https://coveralls.io/repos/github/andy-maier/syslog2/badge.svg?branch=master
    :target: https://coveralls.io/github/andy-maier/syslog2?branch=master
    :alt: Test coverage (master)


Overview
--------

The syslog2 package provides a `syslog2.SysLogHandler`_ class that has some
improvements over the standard Python `logging.handlers.SysLogHandler`_ class:

* It supports a new value "local" for the `address` init parameter that
  automatically does the right thing for logging to the local system log,
  without requiring additional syslog demons or the like (other than what is
  built in to the operating system).

* When a syslog target is used, it supports the log formats defined in
  `RFC3164 <https://www.ietf.org/rfc/rfc3164.html>`_ and
  `RFC5424 <https://www.ietf.org/rfc/rfc5424.html>`_ via a new new optional
  init parameter `format`.

* It supports placing a program name into the log record via a new optional
  init parameter `program`.

* It supports adding a 0x00 Byte at the end of the log message for compatibility
  with older syslog environments, via a new optional init parameter
  `append_nul` that defaults to adding the Byte. This was previously an
  undocumented class attribute (with the same default).

* The previously undocumented class attribute `facility_names` is now
  officially available for callers to determine valid Syslog facility names
  and to map them to facility codes.

* A new class attribute `severity_names` has been added for callers to determine
  valid Syslog severity names and to map them to severity codes.

* The reachability of the targeted system log is verified already during
  creation of the SysLogHandler object, and not only when logging a message
  like the standard Python SysLogHandler class does. Issues with the system
  log are raised through a new `syslog2.SysLogTargetError`_ exception.

The new SysLogHandler class is mostly backwards compatible with the standard
Python SysLogHandler. There are some incompatibilities, though:

* The undocumented class attribute `append_nul` has been removed. This
  feature is now available as a new optional init parameter `append_nul`.

* The undocumented class attributes `priority_map` and `priority_names`
  have been removed or made private.

* The new SysLogTargetError exception needs to be handled.

Migration to use the new SysLogHandler class is easy as long as you did not
use any of the undocumented features:

Old code:

.. code-block:: python

    from logging.handlers import SysLogHandler

    # ... use it

New code:

.. code-block:: python

    from syslog2 import SysLogHandler

    # ... use it

.. _syslog2.SysLogHandler: https://syslog2.readthedocs.io/en/stable/reference.html#syslog2.SysLogHandler
.. _syslog2.SysLogTargetError: https://syslog2.readthedocs.io/en/stable/reference.html#syslog2.SysLogTargetError
.. _logging.handlers.SysLogHandler: https://docs.python.org/3/library/logging.handlers.html#sysloghandler


Installation
------------

To install the latest released version of the syslog2 package into your
active Python environment:

.. code-block:: bash

    $ pip install syslog2

This will also install any prerequisite Python packages.

For more details and alternative ways to install, see `Installation`_.

.. _Installation: https://syslog2.readthedocs.io/en/stable/intro.html#installation


Documentation
-------------

* `Documentation <https://syslog2.readthedocs.io/en/stable/>`_


Change History
--------------

* `Change history <https://syslog2.readthedocs.io/en/stable/changes.html>`_


Contributing
------------

For information on how to contribute to the syslog2 project, see
`Contributing <https://syslog2.readthedocs.io/en/stable/development.html#contributing>`_.


License
-------

The syslog2 project is provided under the
`Apache Software License 2.0 <https://raw.githubusercontent.com/andy-maier/syslog2/master/LICENSE>`_.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/andy-maier/syslog2",
    "name": "syslog2",
    "maintainer": "Andreas Maier",
    "docs_url": null,
    "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
    "maintainer_email": "andreas.r.maier@gmx.de",
    "keywords": "",
    "author": "Andreas Maier",
    "author_email": "andreas.r.maier@gmx.de",
    "download_url": "https://files.pythonhosted.org/packages/db/d0/6224caf2964b90b06c9e2b309811d9ffd90d90f61cdf88e45df46faab7ea/syslog2-0.5.0.tar.gz",
    "platform": "any",
    "description": "syslog2 - An improved SysLogHandler for Python\n==============================================\n\n.. image:: https://badge.fury.io/py/syslog2.svg\n    :target: https://pypi.python.org/pypi/syslog2/\n    :alt: Version on Pypi\n\n.. image:: https://github.com/andy-maier/syslog2/workflows/test/badge.svg?branch=master\n    :target: https://github.com/andy-maier/syslog2/actions/\n    :alt: Actions status\n\n.. image:: https://readthedocs.org/projects/syslog2/badge/?version=latest\n    :target: https://readthedocs.org/projects/syslog2/builds/\n    :alt: Docs build status (master)\n\n.. image:: https://coveralls.io/repos/github/andy-maier/syslog2/badge.svg?branch=master\n    :target: https://coveralls.io/github/andy-maier/syslog2?branch=master\n    :alt: Test coverage (master)\n\n\nOverview\n--------\n\nThe syslog2 package provides a `syslog2.SysLogHandler`_ class that has some\nimprovements over the standard Python `logging.handlers.SysLogHandler`_ class:\n\n* It supports a new value \"local\" for the `address` init parameter that\n  automatically does the right thing for logging to the local system log,\n  without requiring additional syslog demons or the like (other than what is\n  built in to the operating system).\n\n* When a syslog target is used, it supports the log formats defined in\n  `RFC3164 <https://www.ietf.org/rfc/rfc3164.html>`_ and\n  `RFC5424 <https://www.ietf.org/rfc/rfc5424.html>`_ via a new new optional\n  init parameter `format`.\n\n* It supports placing a program name into the log record via a new optional\n  init parameter `program`.\n\n* It supports adding a 0x00 Byte at the end of the log message for compatibility\n  with older syslog environments, via a new optional init parameter\n  `append_nul` that defaults to adding the Byte. This was previously an\n  undocumented class attribute (with the same default).\n\n* The previously undocumented class attribute `facility_names` is now\n  officially available for callers to determine valid Syslog facility names\n  and to map them to facility codes.\n\n* A new class attribute `severity_names` has been added for callers to determine\n  valid Syslog severity names and to map them to severity codes.\n\n* The reachability of the targeted system log is verified already during\n  creation of the SysLogHandler object, and not only when logging a message\n  like the standard Python SysLogHandler class does. Issues with the system\n  log are raised through a new `syslog2.SysLogTargetError`_ exception.\n\nThe new SysLogHandler class is mostly backwards compatible with the standard\nPython SysLogHandler. There are some incompatibilities, though:\n\n* The undocumented class attribute `append_nul` has been removed. This\n  feature is now available as a new optional init parameter `append_nul`.\n\n* The undocumented class attributes `priority_map` and `priority_names`\n  have been removed or made private.\n\n* The new SysLogTargetError exception needs to be handled.\n\nMigration to use the new SysLogHandler class is easy as long as you did not\nuse any of the undocumented features:\n\nOld code:\n\n.. code-block:: python\n\n    from logging.handlers import SysLogHandler\n\n    # ... use it\n\nNew code:\n\n.. code-block:: python\n\n    from syslog2 import SysLogHandler\n\n    # ... use it\n\n.. _syslog2.SysLogHandler: https://syslog2.readthedocs.io/en/stable/reference.html#syslog2.SysLogHandler\n.. _syslog2.SysLogTargetError: https://syslog2.readthedocs.io/en/stable/reference.html#syslog2.SysLogTargetError\n.. _logging.handlers.SysLogHandler: https://docs.python.org/3/library/logging.handlers.html#sysloghandler\n\n\nInstallation\n------------\n\nTo install the latest released version of the syslog2 package into your\nactive Python environment:\n\n.. code-block:: bash\n\n    $ pip install syslog2\n\nThis will also install any prerequisite Python packages.\n\nFor more details and alternative ways to install, see `Installation`_.\n\n.. _Installation: https://syslog2.readthedocs.io/en/stable/intro.html#installation\n\n\nDocumentation\n-------------\n\n* `Documentation <https://syslog2.readthedocs.io/en/stable/>`_\n\n\nChange History\n--------------\n\n* `Change history <https://syslog2.readthedocs.io/en/stable/changes.html>`_\n\n\nContributing\n------------\n\nFor information on how to contribute to the syslog2 project, see\n`Contributing <https://syslog2.readthedocs.io/en/stable/development.html#contributing>`_.\n\n\nLicense\n-------\n\nThe syslog2 project is provided under the\n`Apache Software License 2.0 <https://raw.githubusercontent.com/andy-maier/syslog2/master/LICENSE>`_.\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "An improved SysLogHandler for Python",
    "version": "0.5.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/andy-maier/syslog2/issues",
        "Documentation": "https://syslog2.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/andy-maier/syslog2",
        "Source Code": "https://github.com/andy-maier/syslog2"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "66f85619f07e9abb060778704d2925463265db9aaa9e61369ae42e24e3684030",
                "md5": "66d157c9d7afde2ae3c48a2d4b0d8458",
                "sha256": "daf98cd4f96291194c048bcded2c39b9a84430fad31b76f4e9b997f29d8c8981"
            },
            "downloads": -1,
            "filename": "syslog2-0.5.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "66d157c9d7afde2ae3c48a2d4b0d8458",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
            "size": 16880,
            "upload_time": "2022-09-05T22:39:26",
            "upload_time_iso_8601": "2022-09-05T22:39:26.784206Z",
            "url": "https://files.pythonhosted.org/packages/66/f8/5619f07e9abb060778704d2925463265db9aaa9e61369ae42e24e3684030/syslog2-0.5.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dbd06224caf2964b90b06c9e2b309811d9ffd90d90f61cdf88e45df46faab7ea",
                "md5": "9d8da6986514c2c2857e3971f54bfc93",
                "sha256": "d700baa23631e5945e4b9fc1b7aa012ec4d5dbae675bc368e0c98abd9cb87549"
            },
            "downloads": -1,
            "filename": "syslog2-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9d8da6986514c2c2857e3971f54bfc93",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
            "size": 26185,
            "upload_time": "2022-09-05T22:39:28",
            "upload_time_iso_8601": "2022-09-05T22:39:28.667463Z",
            "url": "https://files.pythonhosted.org/packages/db/d0/6224caf2964b90b06c9e2b309811d9ffd90d90f61cdf88e45df46faab7ea/syslog2-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-09-05 22:39:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "andy-maier",
    "github_project": "syslog2",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "syslog2"
}
        
Elapsed time: 0.33671s