Skip to content

Commit

Permalink
Add routes middleware to chatty loggers disabled at debug level.
Browse files Browse the repository at this point in the history
Also add option to skip disabling the chatty loggers.
  • Loading branch information
jmchilton committed Aug 4, 2016
1 parent 50b6897 commit 2116f97
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/galaxy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,9 +775,14 @@ def configure_logging( config ):
log.info( "Logging at '%s' level to '%s'" % ( level, destination ) )
# Set level
root.setLevel( level )
# Turn down paste httpserver logging
if level <= logging.DEBUG:
logging.getLogger( "paste.httpserver.ThreadPool" ).setLevel( logging.WARN )

disable_chatty_loggers = string_as_bool( config.get( "auto_configure_logging_disable_chatty", "True" ) )
if disable_chatty_loggers:
# Turn down paste httpserver logging
if level <= logging.DEBUG:
for chatty_logger in ["paste.httpserver.ThreadPool", "routes.middleware"]:
logging.getLogger( chatty_logger ).setLevel( logging.WARN )

# Remove old handlers
for h in root.handlers[:]:
root.removeHandler(h)
Expand Down

0 comments on commit 2116f97

Please sign in to comment.