'Write event to file.
@param event: An event.
@type event: L{dict}'

def __call__(self, event):

    text = self.formatEvent(event)
    if (text is None):
        text = u''
    if (self._encoding is not None):
        text = text.encode(self._encoding)
    if text:
        self._outFile.write(text)
        self._outFile.flush()
