parameters: (setDiag, setWarn, filename)
docstring: Set the file handle to log either or both warnings and diagnostics to.
  
      - setDiag and setWarn are True if the corresponding handle is to be set.
      - filename is None for no logging, '-' for stdout, or a pathname.
docstring_summary: Set the file handle to log either or both warnings and diagnostics to.
docstring_tokens: Set the file handle to log either or both warnings and diagnostics to .
function: def setLogFile(setDiag, setWarn, filename):
      """Set the file handle to log either or both warnings and diagnostics to.
  
      - setDiag and setWarn are True if the corresponding handle is to be set.
      - filename is None for no logging, '-' for stdout, or a pathname."""
      global diagFile, warnFile
  
      if filename is None:
          return
  
      if filename == '-':
          fp = sys.stdout
      else:
          fp = open(filename, 'w', encoding='utf-8')
  
      if setDiag:
          diagFile = fp
      if setWarn:
          warnFile = fp
function_tokens: def setLogFile ( setDiag , setWarn , filename ) : global diagFile , warnFile if filename is None : return if filename == '-' : fp = sys . stdout else : fp = open ( filename , 'w' , encoding = 'utf-8' ) if setDiag : diagFile = fp if setWarn : warnFile = fp