code: def setup(self, level=None, log_file=None, json=None):
          
          self.settings = self.wrapper.load(self.settings_name)
  
          my_level = level if level else self.settings['LOG_LEVEL']
          # negate because logger wants True for std out
          my_output = not log_file if log_file else self.settings['LOG_STDOUT']
          my_json = json if json else self.settings['LOG_JSON']
          self.logger = LogFactory.get_instance(json=my_json, stdout=my_output,
                                                level=my_level,
                                                name=self.settings['LOGGER_NAME'],
                                                dir=self.settings['LOG_DIR'],
                                                file=self.settings['LOG_FILE'],
                                                bytes=self.settings['LOG_MAX_BYTES'],
                                                backups=self.settings['LOG_BACKUPS'])
  
          self._decorate_routes()
          self._spawn_redis_connection_thread()
          self._spawn_kafka_connection_thread()
  
          # spawn heartbeat processing loop
          self._heartbeat_thread = Thread(target=self._heartbeat_loop)
          self._heartbeat_thread.setDaemon(True)
          self._heartbeat_thread.start()
  
          self.start_time = self.get_time()
  
          # disable flask logger
          if self.settings['FLASK_LOGGING_ENABLED'] == False:
              log = logging.getLogger('werkzeug')
              log.disabled = True
  
          self._load_schemas()
docs: Load everything up. Note that any arg here will override both
          default and custom settings
  
          @param level: the log level
          @param log_file: boolean t/f whether to log to a file, else stdout
          @param json: boolean t/f whether to write the logs in json