code: def _set_access_log(self, config, level):
          
          access_handler = self._get_param(
              'global',
              'log.access_handler',
              config,
              'syslog',
              )
  
          # log format for syslog
          syslog_formatter = logging.Formatter(
              "ldapcherry[%(process)d]: %(message)s"
              )
  
          # replace access log handler by a syslog handler
          if access_handler == 'syslog':
              cherrypy.log.access_log.handlers = []
              handler = logging.handlers.SysLogHandler(
                  address='/dev/log',
                  facility='user',
                  )
              handler.setFormatter(syslog_formatter)
              cherrypy.log.access_log.addHandler(handler)
  
          # if stdout, open a logger on stdout
          elif access_handler == 'stdout':
              cherrypy.log.access_log.handlers = []
              handler = logging.StreamHandler(sys.stdout)
              formatter = logging.Formatter(
                  'ldapcherry.access - %(levelname)s - %(message)s'
              )
              handler.setFormatter(formatter)
              cherrypy.log.access_log.addHandler(handler)
          # if file, we keep the default
          elif access_handler == 'file':
              pass
  
          # replace access log handler by a null handler
          elif access_handler == 'none':
              cherrypy.log.access_log.handlers = []
              handler = logging.NullHandler()
              cherrypy.log.access_log.addHandler(handler)
  
          # set log level
          cherrypy.log.access_log.setLevel(level)
docs: Configure access logs