'Open the log file.
The log file is always opened in binary mode.'

def _openFile(self):

    self.closed = False
    if os.path.exists(self.path):
        self._file = open(self.path, 'rb+', 0)
        self._file.seek(0, 2)
    elif (self.defaultMode is not None):
        oldUmask = os.umask(511)
        try:
            self._file = open(self.path, 'wb+', 0)
        finally:
            os.umask(oldUmask)
    else:
        self._file = open(self.path, 'wb+', 0)
    if (self.defaultMode is not None):
        try:
            os.chmod(self.path, self.defaultMode)
        except OSError:
            pass
