[Python-modules-commits] [python-verboselogs] 01/13: New upstream version 1.5

Gaurav Juvekar gauravjuvekar-guest at moszumanska.debian.org
Sun Mar 12 20:12:34 UTC 2017


This is an automated email from the git hooks/post-receive script.

gauravjuvekar-guest pushed a commit to branch master
in repository python-verboselogs.

commit 52a6dac5a9f602d366365dbf697df3d8f8a6d863
Author: Gaurav Juvekar <gauravjuvekar at gmail.com>
Date:   Mon Jan 30 13:49:32 2017 +0100

    New upstream version 1.5
---
 LICENSE.txt                               |  20 +++
 MANIFEST.in                               |   2 +
 PKG-INFO                                  | 257 ++++++++++++++++++++++++++++++
 README.rst                                | 226 ++++++++++++++++++++++++++
 requirements-checks.txt                   |   4 +
 requirements-docs.txt                     |   1 +
 requirements-tests.txt                    |  11 ++
 setup.cfg                                 |   8 +
 setup.py                                  |  69 ++++++++
 verboselogs.egg-info/PKG-INFO             | 257 ++++++++++++++++++++++++++++++
 verboselogs.egg-info/SOURCES.txt          |  15 ++
 verboselogs.egg-info/dependency_links.txt |   1 +
 verboselogs.egg-info/top_level.txt        |   1 +
 verboselogs/__init__.py                   | 138 ++++++++++++++++
 verboselogs/pylint.py                     |  36 +++++
 verboselogs/tests.py                      |  71 +++++++++
 16 files changed, 1117 insertions(+)

diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..c086407
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,20 @@
+Copyright (c) 2016 Peter Odding
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..f218bf2
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,2 @@
+include *.rst
+include *.txt
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..dd4e212
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,257 @@
+Metadata-Version: 1.1
+Name: verboselogs
+Version: 1.5
+Summary: Verbose logging level for Python's logging module
+Home-page: https://verboselogs.readthedocs.io
+Author: Peter Odding
+Author-email: peter at peterodding.com
+License: UNKNOWN
+Description: verboselogs: Verbose logging level for Python's logging module
+        ==============================================================
+        
+        .. image:: https://travis-ci.org/xolox/python-verboselogs.svg?branch=master
+           :target: https://travis-ci.org/xolox/python-verboselogs
+        
+        .. image:: https://coveralls.io/repos/xolox/python-verboselogs/badge.png?branch=master
+           :target: https://coveralls.io/r/xolox/python-verboselogs?branch=master
+        
+        The verboselogs_ package extends Python's logging_ module to add the log levels
+        VERBOSE_, NOTICE_, and SPAM_:
+        
+        - The VERBOSE level sits between the predefined INFO and DEBUG levels.
+        - The NOTICE level sits between the predefined WARNING and INFO levels.
+        - The SPAM level sits between the predefined DEBUG and NOTSET levels.
+        
+        The code to do this is simple and short, but I still don't want to copy/paste
+        it to every project I'm working on, hence this package. It's currently tested
+        on Python 2.6, 2.7, 3.4, 3.5 and PyPy.
+        
+        .. contents::
+           :local:
+           :depth: 2
+        
+        Installation
+        ------------
+        
+        The verboselogs package is available on PyPI_ which means installation should
+        be as simple as:
+        
+        .. code-block:: sh
+        
+           $ pip install verboselogs
+        
+        There's actually a multitude of ways to install Python packages (e.g. the `per
+        user site-packages directory`_, `virtual environments`_ or just installing
+        system wide) and I have no intention of getting into that discussion here, so
+        if this intimidates you then read up on your options before returning to these
+        instructions ;-).
+        
+        Usage
+        -----
+        
+        It's very simple to start using the verboselogs package:
+        
+        >>> import logging, verboselogs
+        >>> logger = verboselogs.VerboseLogger('verbose-demo')
+        >>> logger.addHandler(logging.StreamHandler())
+        >>> logger.setLevel(logging.VERBOSE)
+        >>> logger.verbose("Can we have verbose logging? %s", "Yes we can!")
+        
+        Here's a skeleton of a very simple Python program with a command line interface
+        and configurable logging:
+        
+        .. code-block:: python
+        
+           """
+           Usage: demo.py [OPTIONS]
+        
+           This is the usage message of demo.py. Usually
+           this text explains how to use the program.
+        
+           Supported options:
+             -v, --verbose  make more noise
+             -h, --help     show this message and exit
+           """
+        
+           import getopt
+           import logging
+           import sys
+           import verboselogs
+        
+           logger = verboselogs.VerboseLogger('demo')
+           logger.addHandler(logging.StreamHandler())
+           logger.setLevel(logging.INFO)
+        
+           # Command line option defaults.
+           verbosity = 0
+        
+           # Parse command line options.
+           opts, args = getopt.getopt(sys.argv[1:], 'vqh', ['verbose', 'quiet', 'help'])
+        
+           # Map command line options to variables.
+           for option, argument in opts:
+               if option in ('-v', '--verbose'):
+                   verbosity += 1
+               elif option in ('-q', '--quiet'):
+                   verbosity -= 1
+               elif option in ('-h', '--help'):
+                   print __doc__.strip()
+                   sys.exit(0)
+               else:
+                   assert False, "Unhandled option!"
+        
+           # Configure logger for requested verbosity.
+           if verbosity >= 4:
+               logger.setLevel(logging.SPAM)
+           elif verbosity >= 3:
+               logger.setLevel(logging.DEBUG)
+           elif verbosity >= 2:
+               logger.setLevel(logging.VERBOSE)
+           elif verbosity >= 1:
+               logger.setLevel(logging.NOTICE)
+           elif verbosity < 0:
+               logger.setLevel(logging.WARNING)
+        
+           # Your code goes here.
+           ...
+        
+        If you want to set VerboseLogger_ as the default logging class for all
+        subsequent logger instances, you can do so using `verboselogs.install()`_:
+        
+        .. code-block:: python
+        
+           import logging
+           import verboselogs
+        
+           verboselogs.install()
+           logger = logging.getLogger(__name__) # will be a VerboseLogger instance
+        
+        Pylint plugin
+        -------------
+        
+        If using the above `verboselogs.install()`_ approach, Pylint_ is not smart
+        enough to recognize that logging_ is using verboselogs, resulting in errors
+        like::
+        
+           E:285,24: Module 'logging' has no 'VERBOSE' member (no-member)
+           E:375,12: Instance of 'RootLogger' has no 'verbose' member (no-member)
+        
+        To fix this, verboselogs provides a Pylint plugin verboselogs.pylint_ which,
+        when loaded with ``pylint --load-plugins verboselogs.pylint``, adds the
+        verboselogs methods and constants to Pylint's understanding of the logging_
+        module.
+        
+        Overview of logging levels
+        --------------------------
+        
+        The table below shows the names, `numeric values`_ and descriptions_ of the
+        predefined log levels and the VERBOSE, NOTICE, and SPAM levels defined by this
+        package, plus some notes that I added.
+        
+        ========  =====  =============================  =============================
+        Level     Value  Description                    Notes
+        ========  =====  =============================  =============================
+        NOTSET    0      When a logger is created, the  In practice this level is
+                         level is set to NOTSET (note   never explicitly used; it's
+                         that the root logger is        mentioned here only for
+                         created with level WARNING).   completeness.
+        SPAM      5      Way too verbose for regular
+                         debugging, but nice to have
+                         when someone is getting
+                         desperate in a late night
+                         debugging session and decides
+                         that they want as much
+                         instrumentation as possible!
+                         :-)
+        DEBUG     10     Detailed information,          Usually at this level the
+                         typically of interest only     logging output is so low
+                         when diagnosing problems.      level that it's not useful
+                                                        to users who are not
+                                                        familiar with the software's
+                                                        internals.
+        VERBOSE   15     Detailed information that
+                         should be understandable to
+                         experienced users to provide
+                         insight in the software's
+                         behavior; a sort of high
+                         level debugging information.
+        INFO      20     Confirmation that things
+                         are working as expected.
+        NOTICE    25     Auditing information about
+                         things that have multiple
+                         success paths or may need to
+                         be reverted.
+        WARNING   30     An indication that something
+                         unexpected happened, or
+                         indicative of some problem
+                         in the near future (e.g.
+                         ‘disk space low’). The
+                         software is still working
+                         as expected.
+        ERROR     40     Due to a more serious
+                         problem, the software has not
+                         been able to perform some
+                         function.
+        CRITICAL  50     A serious error, indicating
+                         that the program itself may
+                         be unable to continue
+                         running.
+        ========  =====  =============================  =============================
+        
+        Contact
+        -------
+        
+        The latest version of verboselogs is available on PyPI_ and GitHub_. The
+        documentation is hosted on `Read the Docs`_. For bug reports please create an
+        issue on GitHub_. If you have questions, suggestions, etc. feel free to send me
+        an e-mail at `peter at peterodding.com`_.
+        
+        License
+        -------
+        
+        This software is licensed under the `MIT license`_.
+        
+        © 2016 Peter Odding.
+        
+        .. External references:
+        .. _descriptions: http://docs.python.org/howto/logging.html#when-to-use-logging
+        .. _GitHub: https://github.com/xolox/python-verboselogs
+        .. _logging: http://docs.python.org/library/logging.html
+        .. _MIT license: http://en.wikipedia.org/wiki/MIT_License
+        .. _numeric values: http://docs.python.org/howto/logging.html#logging-levels
+        .. _per user site-packages directory: https://www.python.org/dev/peps/pep-0370/
+        .. _peter at peterodding.com: peter at peterodding.com
+        .. _Pylint: https://pypi.python.org/pypi/pylint
+        .. _PyPI: https://pypi.python.org/pypi/verboselogs
+        .. _Read the Docs: https://verboselogs.readthedocs.io
+        .. _SPAM: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.SPAM
+        .. _NOTICE: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.NOTICE
+        .. _VERBOSE: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.VERBOSE
+        .. _VerboseLogger: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.VerboseLogger
+        .. _verboselogs.install(): http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.install
+        .. _verboselogs.pylint: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.pylint
+        .. _verboselogs: https://pypi.python.org/pypi/verboselogs/
+        .. _virtual environments: http://docs.python-guide.org/en/latest/dev/virtualenvs/
+        
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: Information Technology
+Classifier: Intended Audience :: System Administrators
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Software Development
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: System
+Classifier: Topic :: System :: Logging
+Classifier: Topic :: System :: Systems Administration
+Classifier: Topic :: Terminals
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..ba5970a
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,226 @@
+verboselogs: Verbose logging level for Python's logging module
+==============================================================
+
+.. image:: https://travis-ci.org/xolox/python-verboselogs.svg?branch=master
+   :target: https://travis-ci.org/xolox/python-verboselogs
+
+.. image:: https://coveralls.io/repos/xolox/python-verboselogs/badge.png?branch=master
+   :target: https://coveralls.io/r/xolox/python-verboselogs?branch=master
+
+The verboselogs_ package extends Python's logging_ module to add the log levels
+VERBOSE_, NOTICE_, and SPAM_:
+
+- The VERBOSE level sits between the predefined INFO and DEBUG levels.
+- The NOTICE level sits between the predefined WARNING and INFO levels.
+- The SPAM level sits between the predefined DEBUG and NOTSET levels.
+
+The code to do this is simple and short, but I still don't want to copy/paste
+it to every project I'm working on, hence this package. It's currently tested
+on Python 2.6, 2.7, 3.4, 3.5 and PyPy.
+
+.. contents::
+   :local:
+   :depth: 2
+
+Installation
+------------
+
+The verboselogs package is available on PyPI_ which means installation should
+be as simple as:
+
+.. code-block:: sh
+
+   $ pip install verboselogs
+
+There's actually a multitude of ways to install Python packages (e.g. the `per
+user site-packages directory`_, `virtual environments`_ or just installing
+system wide) and I have no intention of getting into that discussion here, so
+if this intimidates you then read up on your options before returning to these
+instructions ;-).
+
+Usage
+-----
+
+It's very simple to start using the verboselogs package:
+
+>>> import logging, verboselogs
+>>> logger = verboselogs.VerboseLogger('verbose-demo')
+>>> logger.addHandler(logging.StreamHandler())
+>>> logger.setLevel(logging.VERBOSE)
+>>> logger.verbose("Can we have verbose logging? %s", "Yes we can!")
+
+Here's a skeleton of a very simple Python program with a command line interface
+and configurable logging:
+
+.. code-block:: python
+
+   """
+   Usage: demo.py [OPTIONS]
+
+   This is the usage message of demo.py. Usually
+   this text explains how to use the program.
+
+   Supported options:
+     -v, --verbose  make more noise
+     -h, --help     show this message and exit
+   """
+
+   import getopt
+   import logging
+   import sys
+   import verboselogs
+
+   logger = verboselogs.VerboseLogger('demo')
+   logger.addHandler(logging.StreamHandler())
+   logger.setLevel(logging.INFO)
+
+   # Command line option defaults.
+   verbosity = 0
+
+   # Parse command line options.
+   opts, args = getopt.getopt(sys.argv[1:], 'vqh', ['verbose', 'quiet', 'help'])
+
+   # Map command line options to variables.
+   for option, argument in opts:
+       if option in ('-v', '--verbose'):
+           verbosity += 1
+       elif option in ('-q', '--quiet'):
+           verbosity -= 1
+       elif option in ('-h', '--help'):
+           print __doc__.strip()
+           sys.exit(0)
+       else:
+           assert False, "Unhandled option!"
+
+   # Configure logger for requested verbosity.
+   if verbosity >= 4:
+       logger.setLevel(logging.SPAM)
+   elif verbosity >= 3:
+       logger.setLevel(logging.DEBUG)
+   elif verbosity >= 2:
+       logger.setLevel(logging.VERBOSE)
+   elif verbosity >= 1:
+       logger.setLevel(logging.NOTICE)
+   elif verbosity < 0:
+       logger.setLevel(logging.WARNING)
+
+   # Your code goes here.
+   ...
+
+If you want to set VerboseLogger_ as the default logging class for all
+subsequent logger instances, you can do so using `verboselogs.install()`_:
+
+.. code-block:: python
+
+   import logging
+   import verboselogs
+
+   verboselogs.install()
+   logger = logging.getLogger(__name__) # will be a VerboseLogger instance
+
+Pylint plugin
+-------------
+
+If using the above `verboselogs.install()`_ approach, Pylint_ is not smart
+enough to recognize that logging_ is using verboselogs, resulting in errors
+like::
+
+   E:285,24: Module 'logging' has no 'VERBOSE' member (no-member)
+   E:375,12: Instance of 'RootLogger' has no 'verbose' member (no-member)
+
+To fix this, verboselogs provides a Pylint plugin verboselogs.pylint_ which,
+when loaded with ``pylint --load-plugins verboselogs.pylint``, adds the
+verboselogs methods and constants to Pylint's understanding of the logging_
+module.
+
+Overview of logging levels
+--------------------------
+
+The table below shows the names, `numeric values`_ and descriptions_ of the
+predefined log levels and the VERBOSE, NOTICE, and SPAM levels defined by this
+package, plus some notes that I added.
+
+========  =====  =============================  =============================
+Level     Value  Description                    Notes
+========  =====  =============================  =============================
+NOTSET    0      When a logger is created, the  In practice this level is
+                 level is set to NOTSET (note   never explicitly used; it's
+                 that the root logger is        mentioned here only for
+                 created with level WARNING).   completeness.
+SPAM      5      Way too verbose for regular
+                 debugging, but nice to have
+                 when someone is getting
+                 desperate in a late night
+                 debugging session and decides
+                 that they want as much
+                 instrumentation as possible!
+                 :-)
+DEBUG     10     Detailed information,          Usually at this level the
+                 typically of interest only     logging output is so low
+                 when diagnosing problems.      level that it's not useful
+                                                to users who are not
+                                                familiar with the software's
+                                                internals.
+VERBOSE   15     Detailed information that
+                 should be understandable to
+                 experienced users to provide
+                 insight in the software's
+                 behavior; a sort of high
+                 level debugging information.
+INFO      20     Confirmation that things
+                 are working as expected.
+NOTICE    25     Auditing information about
+                 things that have multiple
+                 success paths or may need to
+                 be reverted.
+WARNING   30     An indication that something
+                 unexpected happened, or
+                 indicative of some problem
+                 in the near future (e.g.
+                 ‘disk space low’). The
+                 software is still working
+                 as expected.
+ERROR     40     Due to a more serious
+                 problem, the software has not
+                 been able to perform some
+                 function.
+CRITICAL  50     A serious error, indicating
+                 that the program itself may
+                 be unable to continue
+                 running.
+========  =====  =============================  =============================
+
+Contact
+-------
+
+The latest version of verboselogs is available on PyPI_ and GitHub_. The
+documentation is hosted on `Read the Docs`_. For bug reports please create an
+issue on GitHub_. If you have questions, suggestions, etc. feel free to send me
+an e-mail at `peter at peterodding.com`_.
+
+License
+-------
+
+This software is licensed under the `MIT license`_.
+
+© 2016 Peter Odding.
+
+.. External references:
+.. _descriptions: http://docs.python.org/howto/logging.html#when-to-use-logging
+.. _GitHub: https://github.com/xolox/python-verboselogs
+.. _logging: http://docs.python.org/library/logging.html
+.. _MIT license: http://en.wikipedia.org/wiki/MIT_License
+.. _numeric values: http://docs.python.org/howto/logging.html#logging-levels
+.. _per user site-packages directory: https://www.python.org/dev/peps/pep-0370/
+.. _peter at peterodding.com: peter at peterodding.com
+.. _Pylint: https://pypi.python.org/pypi/pylint
+.. _PyPI: https://pypi.python.org/pypi/verboselogs
+.. _Read the Docs: https://verboselogs.readthedocs.io
+.. _SPAM: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.SPAM
+.. _NOTICE: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.NOTICE
+.. _VERBOSE: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.VERBOSE
+.. _VerboseLogger: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.VerboseLogger
+.. _verboselogs.install(): http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.install
+.. _verboselogs.pylint: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.pylint
+.. _verboselogs: https://pypi.python.org/pypi/verboselogs/
+.. _virtual environments: http://docs.python-guide.org/en/latest/dev/virtualenvs/
diff --git a/requirements-checks.txt b/requirements-checks.txt
new file mode 100644
index 0000000..a760996
--- /dev/null
+++ b/requirements-checks.txt
@@ -0,0 +1,4 @@
+# Python packages required to run `make check'.
+flake8 >= 2.6.0
+flake8-docstrings >= 0.2.8
+pyflakes >= 1.2.3
diff --git a/requirements-docs.txt b/requirements-docs.txt
new file mode 100644
index 0000000..7fb0ea1
--- /dev/null
+++ b/requirements-docs.txt
@@ -0,0 +1 @@
+pylint
diff --git a/requirements-tests.txt b/requirements-tests.txt
new file mode 100644
index 0000000..870f1b7
--- /dev/null
+++ b/requirements-tests.txt
@@ -0,0 +1,11 @@
+coloredlogs >= 5.0
+mock >= 1.0.1
+pytest >= 2.6.1
+pytest-cov >= 2.2.1
+
+# The following entries provide a pylint installation that's compatible with
+# Python 2.6. The version pinning here was based on the following resources:
+#  - https://github.com/certbot/certbot/issues/97#issuecomment-65632583
+#  - https://bitbucket.org/logilab/pylint/commits/066bfa24a14f59288379638e1d64a9aa856769fd
+pylint < 1.4
+astroid <= 1.3.2
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..6c71b61
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,8 @@
+[wheel]
+universal = 1
+
+[egg_info]
+tag_build = 
+tag_date = 0
+tag_svn_revision = 0
+
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..6c32408
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+
+# Verbose, notice, and spam log levels for Python's logging module.
+#
+# Author: Peter Odding <peter at peterodding.com>
+# Last Change: July 26, 2016
+# URL: https://verboselogs.readthedocs.io
+
+"""Setup script for the `verboselogs` package."""
+
+# Standard library modules.
+import codecs
+import os
+import re
+
+# De-facto standard solution for Python packaging.
+from setuptools import find_packages, setup
+
+
+def get_contents(*args):
+    """Get the contents of a file relative to the source distribution directory."""
+    with codecs.open(get_absolute_path(*args), 'r', 'UTF-8') as handle:
+        return handle.read()
+
+
+def get_version(*args):
+    """Extract the version number from a Python module."""
+    contents = get_contents(*args)
+    metadata = dict(re.findall('__([a-z]+)__ = [\'"]([^\'"]+)', contents))
+    return metadata['version']
+
+
+def get_absolute_path(*args):
+    """Transform relative pathnames into absolute pathnames."""
+    return os.path.join(os.path.dirname(os.path.abspath(__file__)), *args)
+
+
+setup(
+    name='verboselogs',
+    version=get_version('verboselogs', '__init__.py'),
+    description="Verbose logging level for Python's logging module",
+    long_description=get_contents('README.rst'),
+    url='https://verboselogs.readthedocs.io',
+    author='Peter Odding',
+    author_email='peter at peterodding.com',
+    packages=find_packages(),
+    classifiers=[
+        'Development Status :: 5 - Production/Stable',
+        'Intended Audience :: Developers',
+        'Intended Audience :: Information Technology',
+        'Intended Audience :: System Administrators',
+        'License :: OSI Approved :: MIT License',
+        'Programming Language :: Python',
+        'Programming Language :: Python :: 2',
+        'Programming Language :: Python :: 2.6',
+        'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: 3',
+        'Programming Language :: Python :: 3.4',
+        'Programming Language :: Python :: 3.5',
+        'Programming Language :: Python :: Implementation :: CPython',
+        'Programming Language :: Python :: Implementation :: PyPy',
+        'Topic :: Software Development',
+        'Topic :: Software Development :: Libraries',
+        'Topic :: Software Development :: Libraries :: Python Modules',
+        'Topic :: System',
+        'Topic :: System :: Logging',
+        'Topic :: System :: Systems Administration',
+        'Topic :: Terminals',
+    ])
diff --git a/verboselogs.egg-info/PKG-INFO b/verboselogs.egg-info/PKG-INFO
new file mode 100644
index 0000000..dd4e212
--- /dev/null
+++ b/verboselogs.egg-info/PKG-INFO
@@ -0,0 +1,257 @@
+Metadata-Version: 1.1
+Name: verboselogs
+Version: 1.5
+Summary: Verbose logging level for Python's logging module
+Home-page: https://verboselogs.readthedocs.io
+Author: Peter Odding
+Author-email: peter at peterodding.com
+License: UNKNOWN
+Description: verboselogs: Verbose logging level for Python's logging module
+        ==============================================================
+        
+        .. image:: https://travis-ci.org/xolox/python-verboselogs.svg?branch=master
+           :target: https://travis-ci.org/xolox/python-verboselogs
+        
+        .. image:: https://coveralls.io/repos/xolox/python-verboselogs/badge.png?branch=master
+           :target: https://coveralls.io/r/xolox/python-verboselogs?branch=master
+        
+        The verboselogs_ package extends Python's logging_ module to add the log levels
+        VERBOSE_, NOTICE_, and SPAM_:
+        
+        - The VERBOSE level sits between the predefined INFO and DEBUG levels.
+        - The NOTICE level sits between the predefined WARNING and INFO levels.
+        - The SPAM level sits between the predefined DEBUG and NOTSET levels.
+        
+        The code to do this is simple and short, but I still don't want to copy/paste
+        it to every project I'm working on, hence this package. It's currently tested
+        on Python 2.6, 2.7, 3.4, 3.5 and PyPy.
+        
+        .. contents::
+           :local:
+           :depth: 2
+        
+        Installation
+        ------------
+        
+        The verboselogs package is available on PyPI_ which means installation should
+        be as simple as:
+        
+        .. code-block:: sh
+        
+           $ pip install verboselogs
+        
+        There's actually a multitude of ways to install Python packages (e.g. the `per
+        user site-packages directory`_, `virtual environments`_ or just installing
+        system wide) and I have no intention of getting into that discussion here, so
+        if this intimidates you then read up on your options before returning to these
+        instructions ;-).
+        
+        Usage
+        -----
+        
+        It's very simple to start using the verboselogs package:
+        
+        >>> import logging, verboselogs
+        >>> logger = verboselogs.VerboseLogger('verbose-demo')
+        >>> logger.addHandler(logging.StreamHandler())
+        >>> logger.setLevel(logging.VERBOSE)
+        >>> logger.verbose("Can we have verbose logging? %s", "Yes we can!")
+        
+        Here's a skeleton of a very simple Python program with a command line interface
+        and configurable logging:
+        
+        .. code-block:: python
+        
+           """
+           Usage: demo.py [OPTIONS]
+        
+           This is the usage message of demo.py. Usually
+           this text explains how to use the program.
+        
+           Supported options:
+             -v, --verbose  make more noise
+             -h, --help     show this message and exit
+           """
+        
+           import getopt
+           import logging
+           import sys
+           import verboselogs
+        
+           logger = verboselogs.VerboseLogger('demo')
+           logger.addHandler(logging.StreamHandler())
+           logger.setLevel(logging.INFO)
+        
+           # Command line option defaults.
+           verbosity = 0
+        
+           # Parse command line options.
+           opts, args = getopt.getopt(sys.argv[1:], 'vqh', ['verbose', 'quiet', 'help'])
+        
+           # Map command line options to variables.
+           for option, argument in opts:
+               if option in ('-v', '--verbose'):
+                   verbosity += 1
+               elif option in ('-q', '--quiet'):
+                   verbosity -= 1
+               elif option in ('-h', '--help'):
+                   print __doc__.strip()
+                   sys.exit(0)
+               else:
+                   assert False, "Unhandled option!"
+        
+           # Configure logger for requested verbosity.
+           if verbosity >= 4:
+               logger.setLevel(logging.SPAM)
+           elif verbosity >= 3:
+               logger.setLevel(logging.DEBUG)
+           elif verbosity >= 2:
+               logger.setLevel(logging.VERBOSE)
+           elif verbosity >= 1:
+               logger.setLevel(logging.NOTICE)
+           elif verbosity < 0:
+               logger.setLevel(logging.WARNING)
+        
+           # Your code goes here.
+           ...
+        
+        If you want to set VerboseLogger_ as the default logging class for all
+        subsequent logger instances, you can do so using `verboselogs.install()`_:
+        
+        .. code-block:: python
+        
+           import logging
+           import verboselogs
+        
+           verboselogs.install()
+           logger = logging.getLogger(__name__) # will be a VerboseLogger instance
+        
+        Pylint plugin
+        -------------
+        
+        If using the above `verboselogs.install()`_ approach, Pylint_ is not smart
+        enough to recognize that logging_ is using verboselogs, resulting in errors
+        like::
+        
+           E:285,24: Module 'logging' has no 'VERBOSE' member (no-member)
+           E:375,12: Instance of 'RootLogger' has no 'verbose' member (no-member)
+        
+        To fix this, verboselogs provides a Pylint plugin verboselogs.pylint_ which,
+        when loaded with ``pylint --load-plugins verboselogs.pylint``, adds the
+        verboselogs methods and constants to Pylint's understanding of the logging_
+        module.
+        
+        Overview of logging levels
+        --------------------------
+        
+        The table below shows the names, `numeric values`_ and descriptions_ of the
+        predefined log levels and the VERBOSE, NOTICE, and SPAM levels defined by this
+        package, plus some notes that I added.
+        
+        ========  =====  =============================  =============================
+        Level     Value  Description                    Notes
+        ========  =====  =============================  =============================
+        NOTSET    0      When a logger is created, the  In practice this level is
+                         level is set to NOTSET (note   never explicitly used; it's
+                         that the root logger is        mentioned here only for
+                         created with level WARNING).   completeness.
+        SPAM      5      Way too verbose for regular
+                         debugging, but nice to have
+                         when someone is getting
+                         desperate in a late night
+                         debugging session and decides
+                         that they want as much
+                         instrumentation as possible!
+                         :-)
+        DEBUG     10     Detailed information,          Usually at this level the
+                         typically of interest only     logging output is so low
+                         when diagnosing problems.      level that it's not useful
+                                                        to users who are not
+                                                        familiar with the software's
+                                                        internals.
+        VERBOSE   15     Detailed information that
+                         should be understandable to
+                         experienced users to provide
+                         insight in the software's
+                         behavior; a sort of high
+                         level debugging information.
+        INFO      20     Confirmation that things
+                         are working as expected.
+        NOTICE    25     Auditing information about
+                         things that have multiple
+                         success paths or may need to
+                         be reverted.
+        WARNING   30     An indication that something
+                         unexpected happened, or
+                         indicative of some problem
+                         in the near future (e.g.
+                         ‘disk space low’). The
+                         software is still working
+                         as expected.
+        ERROR     40     Due to a more serious
+                         problem, the software has not
+                         been able to perform some
+                         function.
+        CRITICAL  50     A serious error, indicating
+                         that the program itself may
+                         be unable to continue
+                         running.
+        ========  =====  =============================  =============================
+        
+        Contact
+        -------
+        
+        The latest version of verboselogs is available on PyPI_ and GitHub_. The
+        documentation is hosted on `Read the Docs`_. For bug reports please create an
+        issue on GitHub_. If you have questions, suggestions, etc. feel free to send me
+        an e-mail at `peter at peterodding.com`_.
+        
+        License
+        -------
+        
+        This software is licensed under the `MIT license`_.
+        
+        © 2016 Peter Odding.
+        
+        .. External references:
+        .. _descriptions: http://docs.python.org/howto/logging.html#when-to-use-logging
+        .. _GitHub: https://github.com/xolox/python-verboselogs
+        .. _logging: http://docs.python.org/library/logging.html
+        .. _MIT license: http://en.wikipedia.org/wiki/MIT_License
+        .. _numeric values: http://docs.python.org/howto/logging.html#logging-levels
+        .. _per user site-packages directory: https://www.python.org/dev/peps/pep-0370/
+        .. _peter at peterodding.com: peter at peterodding.com
+        .. _Pylint: https://pypi.python.org/pypi/pylint
+        .. _PyPI: https://pypi.python.org/pypi/verboselogs
+        .. _Read the Docs: https://verboselogs.readthedocs.io
+        .. _SPAM: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.SPAM
+        .. _NOTICE: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.NOTICE
+        .. _VERBOSE: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.VERBOSE
+        .. _VerboseLogger: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.VerboseLogger
+        .. _verboselogs.install(): http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.install
+        .. _verboselogs.pylint: http://verboselogs.readthedocs.io/en/latest/api.html#verboselogs.pylint
+        .. _verboselogs: https://pypi.python.org/pypi/verboselogs/
+        .. _virtual environments: http://docs.python-guide.org/en/latest/dev/virtualenvs/
+        
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: Information Technology
+Classifier: Intended Audience :: System Administrators
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Software Development
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: System
+Classifier: Topic :: System :: Logging
+Classifier: Topic :: System :: Systems Administration
+Classifier: Topic :: Terminals
diff --git a/verboselogs.egg-info/SOURCES.txt b/verboselogs.egg-info/SOURCES.txt
new file mode 100644
index 0000000..79ead0f
--- /dev/null
+++ b/verboselogs.egg-info/SOURCES.txt
@@ -0,0 +1,15 @@
+LICENSE.txt
+MANIFEST.in
+README.rst
+requirements-checks.txt
+requirements-docs.txt
+requirements-tests.txt
+setup.cfg
+setup.py
+verboselogs/__init__.py
+verboselogs/pylint.py
+verboselogs/tests.py
+verboselogs.egg-info/PKG-INFO
+verboselogs.egg-info/SOURCES.txt
+verboselogs.egg-info/dependency_links.txt
+verboselogs.egg-info/top_level.txt
\ No newline at end of file
diff --git a/verboselogs.egg-info/dependency_links.txt b/verboselogs.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/verboselogs.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/verboselogs.egg-info/top_level.txt b/verboselogs.egg-info/top_level.txt
new file mode 100644
index 0000000..a46ba0c
--- /dev/null
+++ b/verboselogs.egg-info/top_level.txt
@@ -0,0 +1 @@
+verboselogs
diff --git a/verboselogs/__init__.py b/verboselogs/__init__.py
new file mode 100644
index 0000000..e99ec29
--- /dev/null
+++ b/verboselogs/__init__.py
@@ -0,0 +1,138 @@
+# Verbose, notice, and spam log levels for Python's logging module.
+#
+# Author: Peter Odding <peter at peterodding.com>
+# Last Change: July 26, 2016
+# URL: https://verboselogs.readthedocs.io
+
+"""
+Verbose, notice, and spam log levels for Python's :mod:`logging` module.
+
+The :mod:`verboselogs` module defines the :data:`VERBOSE`, :data:`NOTICE`, and
+:data:`SPAM` constants, the :class:`VerboseLogger` class and the
+:func:`add_log_level()` and :func:`install()` functions. At import time
+:func:`add_log_level()` is used to register the custom log levels
+:data:`VERBOSE`, :data:`NOTICE`, and :data:`SPAM` with Python's :mod:`logging`
+module.
+"""
+
+import logging
+
... 238 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-verboselogs.git



More information about the Python-modules-commits mailing list