diff options
| author | Marc Abramowitz <marc@marc-abramowitz.com> | 2016-03-07 08:20:39 -0800 |
|---|---|---|
| committer | Marc Abramowitz <marc@marc-abramowitz.com> | 2016-04-06 11:03:28 -0700 |
| commit | 1514ea003dfe39fa79a0ec07bbbc14f239cb4eb2 (patch) | |
| tree | d9f257b9edb5699b1eb3886f71797a11217d555e /CHANGES.txt | |
| parent | a9cdf5be43d9dd915f8611f540e2f839c2e8d6a0 (diff) | |
| download | pyramid-1514ea003dfe39fa79a0ec07bbbc14f239cb4eb2.tar.gz pyramid-1514ea003dfe39fa79a0ec07bbbc14f239cb4eb2.tar.bz2 pyramid-1514ea003dfe39fa79a0ec07bbbc14f239cb4eb2.zip | |
Pass vars to logging.config.fileConfig
This allows one to set up a logging configuration that is parameterized
based on variables specified on the command-line.
e.g.: the application .ini file could have:
```ini
[logger_root]
level = %(LOGGING_LOGGER_ROOT_LEVEL)s
handlers = console
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = %(LOGGING_HANDLER_CONSOLE_LEVEL)s
formatter = generic
```
This app could be launched with:
```
pserve development.ini LOGGING_LOGGER_ROOT_LEVEL=DEBUG LOGGING_HANDLER_CONSOLE_LEVEL=DEBUG
```
Diffstat (limited to 'CHANGES.txt')
| -rw-r--r-- | CHANGES.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index a17f4aab5..4a61dbffa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -27,6 +27,12 @@ unreleased where you may need more control over the request. See https://github.com/Pylons/pyramid/pull/2393 +- Allow using variable substitutions like ``%(LOGGING_LOGGER_ROOT_LEVEL)s`` + for logging sections of the .ini file and populate these variables from + the ``pserve`` command line -- e.g.: + ``pserve development.ini LOGGING_LOGGER_ROOT_LEVEL=DEBUG`` + See https://github.com/Pylons/pyramid/pull/2399 + 1.6 (2015-04-14) ================ |
