From a87a68d83f713ed3cd81011b486178179e3b413e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 22 Jan 2011 23:02:57 -0500 Subject: - The ``production.ini`` generated by all paster templates now have an effective logging level of WARN, which prevents e.g. SQLAlchemy statement logging and other inappropriate output. - The ``production.ini`` of the ``pyramid_routesalchemy`` and ``pyramid_alchemy`` paster templates did not have a ``sqlalchemy`` logger section, preventing ``paster serve production.ini`` from working. - The ``pyramid_routesalchemy`` and ``pyramid_alchemy`` paster templates used the ``{{package}}`` variable in a place where it should have used the ``{{project}}`` variable, causing applications created with uppercase letters e.g. ``paster create -t pyramid_routesalchemy Dibbus`` to fail to start when ``paster serve development.ini`` was used against the result. See https://github.com/Pylons/pyramid/issues/#issue/107 Closes #107 --- CHANGES.txt | 21 +++++++++++++++++++++ .../tutorials/wiki/src/authorization/production.ini | 4 ++-- docs/tutorials/wiki/src/basiclayout/production.ini | 4 ++-- docs/tutorials/wiki/src/models/production.ini | 4 ++-- docs/tutorials/wiki/src/views/production.ini | 4 ++-- .../wiki2/src/authorization/production.ini | 12 ++++++++++-- docs/tutorials/wiki2/src/basiclayout/production.ini | 12 ++++++++++-- docs/tutorials/wiki2/src/models/production.ini | 12 ++++++++++-- docs/tutorials/wiki2/src/views/production.ini | 12 ++++++++++-- .../paster_templates/alchemy/development.ini_tmpl | 6 +++--- .../paster_templates/alchemy/production.ini_tmpl | 12 ++++++++++-- .../routesalchemy/development.ini_tmpl | 2 +- .../routesalchemy/production.ini_tmpl | 12 ++++++++++-- .../paster_templates/starter/production.ini_tmpl | 4 ++-- pyramid/paster_templates/zodb/production.ini_tmpl | 4 ++-- 15 files changed, 97 insertions(+), 28 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 598dc094e..f6093d23f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,24 @@ +Next release +============ + +Bug Fixes +--------- + +- The ``production.ini`` generated by all paster templates now have an + effective logging level of WARN, which prevents e.g. SQLAlchemy statement + logging and other inappropriate output. + +- The ``production.ini`` of the ``pyramid_routesalchemy`` and + ``pyramid_alchemy`` paster templates did not have a ``sqlalchemy`` logger + section, preventing ``paster serve production.ini`` from working. + +- The ``pyramid_routesalchemy`` and ``pyramid_alchemy`` paster templates used + the ``{{package}}`` variable in a place where it should have used the + ``{{project}}`` variable, causing applications created with uppercase + letters e.g. ``paster create -t pyramid_routesalchemy Dibbus`` to fail to + start when ``paster serve development.ini`` was used against the result. + See https://github.com/Pylons/pyramid/issues/#issue/107 + 1.0b1 (2011-01-21) ================== diff --git a/docs/tutorials/wiki/src/authorization/production.ini b/docs/tutorials/wiki/src/authorization/production.ini index eac34bb56..458064388 100644 --- a/docs/tutorials/wiki/src/authorization/production.ini +++ b/docs/tutorials/wiki/src/authorization/production.ini @@ -50,11 +50,11 @@ keys = console keys = generic [logger_root] -level = INFO +level = WARN handlers = console [logger_tutorial] -level = INFO +level = WARN handlers = qualname = tutorial diff --git a/docs/tutorials/wiki/src/basiclayout/production.ini b/docs/tutorials/wiki/src/basiclayout/production.ini index eac34bb56..458064388 100644 --- a/docs/tutorials/wiki/src/basiclayout/production.ini +++ b/docs/tutorials/wiki/src/basiclayout/production.ini @@ -50,11 +50,11 @@ keys = console keys = generic [logger_root] -level = INFO +level = WARN handlers = console [logger_tutorial] -level = INFO +level = WARN handlers = qualname = tutorial diff --git a/docs/tutorials/wiki/src/models/production.ini b/docs/tutorials/wiki/src/models/production.ini index eac34bb56..458064388 100644 --- a/docs/tutorials/wiki/src/models/production.ini +++ b/docs/tutorials/wiki/src/models/production.ini @@ -50,11 +50,11 @@ keys = console keys = generic [logger_root] -level = INFO +level = WARN handlers = console [logger_tutorial] -level = INFO +level = WARN handlers = qualname = tutorial diff --git a/docs/tutorials/wiki/src/views/production.ini b/docs/tutorials/wiki/src/views/production.ini index eac34bb56..458064388 100644 --- a/docs/tutorials/wiki/src/views/production.ini +++ b/docs/tutorials/wiki/src/views/production.ini @@ -50,11 +50,11 @@ keys = console keys = generic [logger_root] -level = INFO +level = WARN handlers = console [logger_tutorial] -level = INFO +level = WARN handlers = qualname = tutorial diff --git a/docs/tutorials/wiki2/src/authorization/production.ini b/docs/tutorials/wiki2/src/authorization/production.ini index 65f5f08c0..0fdc38811 100644 --- a/docs/tutorials/wiki2/src/authorization/production.ini +++ b/docs/tutorials/wiki2/src/authorization/production.ini @@ -49,14 +49,22 @@ keys = console keys = generic [logger_root] -level = INFO +level = WARN handlers = console [logger_tutorial] -level = INFO +level = WARN handlers = qualname = tutorial +[logger_sqlalchemy] +level = WARN +handlers = +qualname = sqlalchemy.engine +# "level = INFO" logs SQL queries. +# "level = DEBUG" logs SQL queries and results. +# "level = WARN" logs neither. (Recommended for production systems.) + [handler_console] class = StreamHandler args = (sys.stderr,) diff --git a/docs/tutorials/wiki2/src/basiclayout/production.ini b/docs/tutorials/wiki2/src/basiclayout/production.ini index 65f5f08c0..0fdc38811 100644 --- a/docs/tutorials/wiki2/src/basiclayout/production.ini +++ b/docs/tutorials/wiki2/src/basiclayout/production.ini @@ -49,14 +49,22 @@ keys = console keys = generic [logger_root] -level = INFO +level = WARN handlers = console [logger_tutorial] -level = INFO +level = WARN handlers = qualname = tutorial +[logger_sqlalchemy] +level = WARN +handlers = +qualname = sqlalchemy.engine +# "level = INFO" logs SQL queries. +# "level = DEBUG" logs SQL queries and results. +# "level = WARN" logs neither. (Recommended for production systems.) + [handler_console] class = StreamHandler args = (sys.stderr,) diff --git a/docs/tutorials/wiki2/src/models/production.ini b/docs/tutorials/wiki2/src/models/production.ini index 65f5f08c0..0fdc38811 100644 --- a/docs/tutorials/wiki2/src/models/production.ini +++ b/docs/tutorials/wiki2/src/models/production.ini @@ -49,14 +49,22 @@ keys = console keys = generic [logger_root] -level = INFO +level = WARN handlers = console [logger_tutorial] -level = INFO +level = WARN handlers = qualname = tutorial +[logger_sqlalchemy] +level = WARN +handlers = +qualname = sqlalchemy.engine +# "level = INFO" logs SQL queries. +# "level = DEBUG" logs SQL queries and results. +# "level = WARN" logs neither. (Recommended for production systems.) + [handler_console] class = StreamHandler args = (sys.stderr,) diff --git a/docs/tutorials/wiki2/src/views/production.ini b/docs/tutorials/wiki2/src/views/production.ini index 65f5f08c0..0fdc38811 100644 --- a/docs/tutorials/wiki2/src/views/production.ini +++ b/docs/tutorials/wiki2/src/views/production.ini @@ -49,14 +49,22 @@ keys = console keys = generic [logger_root] -level = INFO +level = WARN handlers = console [logger_tutorial] -level = INFO +level = WARN handlers = qualname = tutorial +[logger_sqlalchemy] +level = WARN +handlers = +qualname = sqlalchemy.engine +# "level = INFO" logs SQL queries. +# "level = DEBUG" logs SQL queries and results. +# "level = WARN" logs neither. (Recommended for production systems.) + [handler_console] class = StreamHandler args = (sys.stderr,) diff --git a/pyramid/paster_templates/alchemy/development.ini_tmpl b/pyramid/paster_templates/alchemy/development.ini_tmpl index 8433764e0..accec1718 100644 --- a/pyramid/paster_templates/alchemy/development.ini_tmpl +++ b/pyramid/paster_templates/alchemy/development.ini_tmpl @@ -1,5 +1,5 @@ -[app:{{package}}] -use = egg:{{package}} +[app:{{project}}] +use = egg:{{project}} reload_templates = true debug_authorization = false debug_notfound = false @@ -12,7 +12,7 @@ sqlalchemy.url = sqlite:///%(here)s/{{project}}.db pipeline = egg:WebError#evalerror tm - {{package}} + {{project}} [filter:tm] use = egg:repoze.tm2#tm diff --git a/pyramid/paster_templates/alchemy/production.ini_tmpl b/pyramid/paster_templates/alchemy/production.ini_tmpl index 7f1332310..0deb1dd5f 100644 --- a/pyramid/paster_templates/alchemy/production.ini_tmpl +++ b/pyramid/paster_templates/alchemy/production.ini_tmpl @@ -49,14 +49,22 @@ keys = console keys = generic [logger_root] -level = INFO +level = WARN handlers = console [logger_{{package_logger}}] -level = INFO +level = WARN handlers = qualname = {{package}} +[logger_sqlalchemy] +level = WARN +handlers = +qualname = sqlalchemy.engine +# "level = INFO" logs SQL queries. +# "level = DEBUG" logs SQL queries and results. +# "level = WARN" logs neither. (Recommended for production systems.) + [handler_console] class = StreamHandler args = (sys.stderr,) diff --git a/pyramid/paster_templates/routesalchemy/development.ini_tmpl b/pyramid/paster_templates/routesalchemy/development.ini_tmpl index 8bd906553..accec1718 100644 --- a/pyramid/paster_templates/routesalchemy/development.ini_tmpl +++ b/pyramid/paster_templates/routesalchemy/development.ini_tmpl @@ -12,7 +12,7 @@ sqlalchemy.url = sqlite:///%(here)s/{{project}}.db pipeline = egg:WebError#evalerror tm - {{package}} + {{project}} [filter:tm] use = egg:repoze.tm2#tm diff --git a/pyramid/paster_templates/routesalchemy/production.ini_tmpl b/pyramid/paster_templates/routesalchemy/production.ini_tmpl index 7f1332310..0deb1dd5f 100644 --- a/pyramid/paster_templates/routesalchemy/production.ini_tmpl +++ b/pyramid/paster_templates/routesalchemy/production.ini_tmpl @@ -49,14 +49,22 @@ keys = console keys = generic [logger_root] -level = INFO +level = WARN handlers = console [logger_{{package_logger}}] -level = INFO +level = WARN handlers = qualname = {{package}} +[logger_sqlalchemy] +level = WARN +handlers = +qualname = sqlalchemy.engine +# "level = INFO" logs SQL queries. +# "level = DEBUG" logs SQL queries and results. +# "level = WARN" logs neither. (Recommended for production systems.) + [handler_console] class = StreamHandler args = (sys.stderr,) diff --git a/pyramid/paster_templates/starter/production.ini_tmpl b/pyramid/paster_templates/starter/production.ini_tmpl index 31bc97b33..dea0ef2c6 100644 --- a/pyramid/paster_templates/starter/production.ini_tmpl +++ b/pyramid/paster_templates/starter/production.ini_tmpl @@ -43,11 +43,11 @@ keys = console keys = generic [logger_root] -level = INFO +level = WARN handlers = console [logger_{{package_logger}}] -level = INFO +level = WARN handlers = qualname = {{package}} diff --git a/pyramid/paster_templates/zodb/production.ini_tmpl b/pyramid/paster_templates/zodb/production.ini_tmpl index 93aeee358..3329f1228 100644 --- a/pyramid/paster_templates/zodb/production.ini_tmpl +++ b/pyramid/paster_templates/zodb/production.ini_tmpl @@ -50,11 +50,11 @@ keys = console keys = generic [logger_root] -level = INFO +level = WARN handlers = console [logger_{{package_logger}}] -level = INFO +level = WARN handlers = qualname = {{package}} -- cgit v1.2.3