summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislaw Pitucha <stanislaw.pitucha@hp.com>2014-08-27 13:58:15 +0100
committerStanislaw Pitucha <stanislaw.pitucha@hp.com>2014-08-27 16:28:38 +0100
commit0596397e93b7735b36a9b898dc72be9cc1d1bbe7 (patch)
treefc7e7a005d4fbce251fc7365fc4ff5bd7a379005
parent7a086c37132d7c7c1416eba94a398eb6584c1175 (diff)
downloadpecan-0596397e93b7735b36a9b898dc72be9cc1d1bbe7.tar.gz
Configure the root logger properly
The documentation and project template showed logging configuration which sets level INFO for module called 'root' rather than the root logger. Configure the root (default) logger instead. Change-Id: I172d06dc6b81a31c5b698e43be50ab6302d54984
-rw-r--r--docs/source/configuration.rst3
-rw-r--r--docs/source/logging.rst2
-rw-r--r--pecan/scaffolds/base/config.py_tmpl2
-rw-r--r--pecan/scaffolds/rest-api/config.py_tmpl2
4 files changed, 4 insertions, 5 deletions
diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst
index d1f9f83..47b0a43 100644
--- a/docs/source/configuration.rst
+++ b/docs/source/configuration.rst
@@ -194,8 +194,8 @@ dictionaries.
::
logging = {
+ 'root': {'level': 'INFO', 'handlers': ['console']},
'loggers': {
- 'root': {'level': 'INFO', 'handlers': ['console']},
'sqlalchemy.engine': {'level': 'INFO', 'handlers': ['console']},
'__force_dict__': True
},
@@ -208,5 +208,4 @@ dictionaries.
from myapp import conf
assert isinstance(conf.logging.loggers, dict)
- assert isinstance(conf.logging.loggers['root'], dict)
assert isinstance(conf.logging.loggers['sqlalchemy.engine'], dict)
diff --git a/docs/source/logging.rst b/docs/source/logging.rst
index 940c7af..0060a56 100644
--- a/docs/source/logging.rst
+++ b/docs/source/logging.rst
@@ -31,8 +31,8 @@ The default configuration defines one handler and two loggers.
server = { ... }
logging = {
+ 'root' : {'level': 'INFO', 'handlers': ['console']},
'loggers': {
- 'root' : {'level': 'INFO', 'handlers': ['console']},
'myapp': {'level': 'DEBUG', 'handlers': ['console']}
},
'handlers': {
diff --git a/pecan/scaffolds/base/config.py_tmpl b/pecan/scaffolds/base/config.py_tmpl
index 696cc6a..6d70d5c 100644
--- a/pecan/scaffolds/base/config.py_tmpl
+++ b/pecan/scaffolds/base/config.py_tmpl
@@ -18,8 +18,8 @@ app = {
}
logging = {
+ 'root': {'level': 'INFO', 'handlers': ['console']},
'loggers': {
- 'root': {'level': 'INFO', 'handlers': ['console']},
'${package}': {'level': 'DEBUG', 'handlers': ['console']},
'pecan.commands.serve': {'level': 'DEBUG', 'handlers': ['console']},
'py.warnings': {'handlers': ['console']},
diff --git a/pecan/scaffolds/rest-api/config.py_tmpl b/pecan/scaffolds/rest-api/config.py_tmpl
index b0b3839..6713c20 100644
--- a/pecan/scaffolds/rest-api/config.py_tmpl
+++ b/pecan/scaffolds/rest-api/config.py_tmpl
@@ -12,8 +12,8 @@ app = {
}
logging = {
+ 'root': {'level': 'INFO', 'handlers': ['console']},
'loggers': {
- 'root': {'level': 'INFO', 'handlers': ['console']},
'${package}': {'level': 'DEBUG', 'handlers': ['console']},
'pecan.commands.serve': {'level': 'DEBUG', 'handlers': ['console']},
'py.warnings': {'handlers': ['console']},