diff options
| author | Chris McDonough <chrism@agendaless.com> | 2008-10-03 20:11:06 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2008-10-03 20:11:06 +0000 |
| commit | 47b4d3ee62dfdb830a83192907b0602218f9ab5e (patch) | |
| tree | 6fe0cce905bcc39f1ab431101fe419f4197305f9 /repoze/bfg/tests/test_log.py | |
| parent | 68fe4a3a211176a282212a441d04ab53227f6bd2 (diff) | |
| download | pyramid-47b4d3ee62dfdb830a83192907b0602218f9ab5e.tar.gz pyramid-47b4d3ee62dfdb830a83192907b0602218f9ab5e.tar.bz2 pyramid-47b4d3ee62dfdb830a83192907b0602218f9ab5e.zip | |
Docs
- An "Environment and Configuration" chapter was added to the narrative
portion of the documentation.
Features
- Ensure bfg doesn't generate warnings when running under Python
2.6.
- The environment variable ``BFG_RELOAD_TEMPLATES`` is now available
(serves the same purpose as ``reload_templates`` in the config file).
- A new configuration file option ``debug_authorization`` was added.
This turns on printing of security authorization debug statements
to ``sys.stderr``. The ``BFG_DEBUG_AUTHORIZATION`` environment
variable was also added; this performs the same duty.
Bug Fixes
- The environment variable ``BFG_SECURITY_DEBUG`` did not always work.
It has been renamed to ``BFG_DEBUG_AUTHORIZATION`` and fixed.
Deprecations
- A deprecation warning is now issued when old API names from the
``repoze.bfg.templates`` module are imported.
Backwards incompatibilities
- The ``BFG_SECURITY_DEBUG`` environment variable was renamed to
``BFG_DEBUG_AUTHORIZATION``.
Diffstat (limited to 'repoze/bfg/tests/test_log.py')
| -rw-r--r-- | repoze/bfg/tests/test_log.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/repoze/bfg/tests/test_log.py b/repoze/bfg/tests/test_log.py new file mode 100644 index 000000000..4cc8d12a0 --- /dev/null +++ b/repoze/bfg/tests/test_log.py @@ -0,0 +1,16 @@ +import unittest + +class TestFunctions(unittest.TestCase): + def test_make_stream_logger(self): + from repoze.bfg.log import make_stream_logger + import logging + import sys + logger = make_stream_logger('foo', sys.stderr, levelname='DEBUG', + fmt='%(message)s') + self.assertEqual(logger.name, 'foo') + self.assertEqual(logger.handlers[0].stream, sys.stderr) + self.assertEqual(logger.handlers[0].formatter._fmt, '%(message)s') + self.assertEqual(logger.level, logging.DEBUG) + + + |
