def register_logger(app):
 if app.debug:
  return
 handler = logging.StreamHandler()
 handler.setLevel(logging.ERROR)
 app.logger.addHandler(handler)

def register_logger ( app ) : if app . debug : return handler = logging . StreamHandler ( ) handler . setLevel ( logging . ERROR ) app . logger . addHandler ( handler )
track the logger for production mode .