<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setLog(self, fileName, writeName=False):
 """ Opens a log file with name fileName. """

        self.log = 1
        self.logFile = fileName
        self._logPtr = open(fileName, "w")
        if writeName:
            self._namePtr = open(fileName + ".name", "w")