Changeset - b1fc5a98952c
[Not reviewed]
default
0 2 0
Thomas De Schampheleire - 9 years ago 2016-08-19 22:02:24
thomas.de.schampheleire@gmail.com
test.ini: align some logging-related settings with development.ini

When manually using test.ini (that is, not via the test suite) the coloring
of log output like development.ini provides can be very useful.
Note that this color output is not taken along by pytest-capturelog,
regardless of this patch.

Some extra-verbose logging in test.ini is on the other hand not needed and
could be enabled when needed by a specific developer.

Note: the 'level=DEBUG' setting for handler_console_sql is not taken along
to test.ini: it causes duplicate sqlalchemy debug logs, one through
handler_console_sql and another through another path.

If future experience points out that some of these changes are actually
worse than they were, adjustments can still be made.
2 files changed with 16 insertions and 16 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/test.ini
Show inline comments
 
@@ -531,8 +531,7 @@ keys = generic, color_formatter, color_f
 
#############
 

	
 
[logger_root]
 
#level = NOTSET
 
level = DEBUG
 
level = NOTSET
 
handlers = console
 

	
 
[logger_routes]
 
@@ -561,10 +560,8 @@ qualname = kallithea
 
propagate = 1
 

	
 
[logger_sqlalchemy]
 
#level = INFO
 
level = ERROR
 
#handlers = console_sql
 
handlers = console
 
level = INFO
 
handlers = console_sql
 
qualname = sqlalchemy.engine
 
propagate = 0
 

	
 
@@ -582,14 +579,16 @@ propagate = 1
 
class = StreamHandler
 
args = (sys.stderr,)
 
#level = INFO
 
level = NOTSET
 
formatter = generic
 
level = DEBUG
 
#formatter = generic
 
formatter = color_formatter
 

	
 
[handler_console_sql]
 
class = StreamHandler
 
args = (sys.stderr,)
 
level = WARN
 
formatter = generic
 
#formatter = generic
 
formatter = color_formatter_sql
 

	
 
################
 
## FORMATTERS ##
scripts/generate-ini.py
Show inline comments
 
@@ -62,15 +62,16 @@ ini_files = [
 
                'beaker.cache.lock_dir': '%(here)s/../../data/test/cache/lock',
 
                'sqlalchemy.db1.url': 'sqlite:///%(here)s/kallithea_test.sqlite',
 
            },
 
            '[logger_root]': {
 
            '[handler_console]': {
 
                'level': 'DEBUG',
 
                'formatter': 'color_formatter',
 
            },
 
            '[logger_sqlalchemy]': {
 
                'level': 'ERROR',
 
                'handlers': 'console',
 
            },
 
            '[handler_console]': {
 
                'level': 'NOTSET',
 
            # The 'handler_console_sql' block is very similar to the one in
 
            # development.ini, but without the explicit 'level=DEBUG' setting:
 
            # it causes duplicate sqlalchemy debug logs, one through
 
            # handler_console_sql and another through another path.
 
            '[handler_console_sql]': {
 
                'formatter': 'color_formatter_sql',
 
            },
 
        },
 
    ),
0 comments (0 inline, 0 general)