Metadata-Version: 1.1
Name: cs.pfx
Version: 20170903
Summary: Easy context prefixes for messages.
Home-page: https://bitbucket.org/cameron_simpson/css/commits/all
Author: Cameron Simpson
Author-email: cs@cskk.id.au
License: UNKNOWN
Description: The primary facility here is Pfx,
        a context manager which manitains a per thread stack of context prefixes.
        Usage is like this::
        
          from cs.pfx import Pfx
          ...
          def parser(filename):
            with Pfx("parse(%r)", filename):
              with open(filename) as f:
                for line, lineno in enumerate(f, 1):
                  with Pfx("%d", lineno) as P:
                    if line_is_invalid(line):
                      raise ValueError("problem!")
                    P.info("line = %r", line)
        
        This produces log messages like::
        
          datafile: 1: line = 'foo\n'
        
        and exception messages like::
        
          datafile: 17: problem!
        
        which lets one put just the relevant complaint in exception and log
        messages and get useful calling context on the output.
        This does make for wordier logs and exceptions
        but used with a little discretion produces far more debugable results.
Keywords: python2,python3
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
