Mercurial > kallithea
diff development.ini @ 7768:609d52bbf917
ini: create separate log handlers for color and null, and add comments hinting how they can be used
Let development.ini use color for the root logger as before. The special effect
of color_sql was not visible with the default sqlalchemy log level of WARN, so
just use color there as well.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 31 Jul 2019 02:55:22 +0200 |
parents | b10427b07d4b |
children | 6da70f4569bf |
line wrap: on
line diff
--- a/development.ini Wed Jul 31 02:51:28 2019 +0200 +++ b/development.ini Wed Jul 31 02:55:22 2019 +0200 @@ -356,7 +356,7 @@ keys = root, routes, kallithea, sqlalchemy, tg, gearbox, beaker, templates, whoosh_indexer, werkzeug, backlash [handlers] -keys = console, console_sql +keys = console, console_color, console_color_sql, null [formatters] keys = generic, color_formatter, color_formatter_sql @@ -367,7 +367,10 @@ [logger_root] level = NOTSET -handlers = console +#handlers = console +handlers = console_color +# For coloring based on log level: +# handlers = console_color [logger_routes] #level = WARN @@ -408,9 +411,12 @@ [logger_sqlalchemy] level = WARN -handlers = console_sql +handlers = qualname = sqlalchemy.engine -propagate = 0 +# For coloring based on log level and pretty printing of SQL: +# level = INFO +# handlers = console_color_sql +# propagate = 0 [logger_whoosh_indexer] #level = WARN @@ -435,15 +441,24 @@ [handler_console] class = StreamHandler args = (sys.stderr,) -#formatter = generic +formatter = generic + +[handler_console_color] +# ANSI color coding based on log level +class = StreamHandler +args = (sys.stderr,) formatter = color_formatter -[handler_console_sql] +[handler_console_color_sql] +# ANSI color coding and pretty printing of SQL statements class = StreamHandler args = (sys.stderr,) -#formatter = generic formatter = color_formatter_sql +[handler_null] +class = NullHandler +args = () + ################ ## FORMATTERS ## ################