forked from Pylons/pyramid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add logging configuration to all paster templates.
- ``pyramid_alchemy``, ``pyramid_routesalchemy``, and ``pylons_sqla`` paster templates now use idiomatic SQLAlchemy configuration in their respective ``.ini`` files and Python code.
- Loading branch information
Showing
16 changed files
with
294 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 3 additions & 5 deletions
8
pyramid/paster_templates/routesalchemy/+package+/__init__.py_tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 38 additions & 5 deletions
43
pyramid/paster_templates/routesalchemy/development.ini_tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,53 @@ | ||
[app:{{package}}] | ||
use = egg:{{package}} | ||
[app:{{project}}] | ||
use = egg:{{project}} | ||
reload_templates = true | ||
debug_authorization = false | ||
debug_notfound = false | ||
debug_templates = true | ||
default_locale_name = en | ||
db_string = sqlite:///%(here)s/{{package}}.db | ||
db_echo = false | ||
sqlalchemy.url = sqlite:///%(here)s/{{project}}.db | ||
|
||
[pipeline:main] | ||
pipeline = | ||
egg:WebError#evalerror | ||
egg:repoze.tm2#tm | ||
{{package}} | ||
{{project}} | ||
|
||
[server:main] | ||
use = egg:Paste#http | ||
host = 0.0.0.0 | ||
port = 6543 | ||
|
||
# Begin logging configuration | ||
|
||
[loggers] | ||
keys = root, sqlalchemy | ||
|
||
[handlers] | ||
keys = console | ||
|
||
[formatters] | ||
keys = generic | ||
|
||
[logger_root] | ||
level = INFO | ||
handlers = console | ||
|
||
[logger_sqlalchemy] | ||
level = INFO | ||
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,) | ||
level = NOTSET | ||
formatter = generic | ||
|
||
[formatter_generic] | ||
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s | ||
|
||
# End logging configuration |
Oops, something went wrong.