def get_access_logs(config):
 access_log = ((Literal('access_log') + ZeroOrMore(parameter)) + semicolon)
 access_log.ignore(pythonStyleComment)
 for directive in access_log.searchString(config).asList():
  path = directive[1]
  if ((path == 'off') or path.startswith('syslog:')):
   continue
  format_name = 'combined'
  if ((len(directive) > 2) and ('=' not in directive[2])):
   format_name = directive[2]
  (yield (path, format_name))

def get_access_logs ( config ) : access_log = ( ( Literal ( 'access_log' ) + ZeroOrMore ( parameter ) ) + semicolon ) access_log . ignore ( pythonStyleComment ) for directive in access_log . searchString ( config ) . asList ( ) : path = directive [ 1 ] if ( ( path == 'off' ) or path . startswith ( 'syslog:' ) ) : continue format_name = 'combined' if ( ( len ( directive ) > 2 ) and ( '=' not in directive [ 2 ] ) ) : format_name = directive [ 2 ] ( yield ( path , format_name ) )
parse config for access_log directives :return: iterator over tuple of found directives .