'FileLogObserver.emit() will add a timestamp and system prefix to its
file output.'

def test_emitPrefix(self):

    output = StringIO()
    flo = log.FileLogObserver(output)
    events = []
    def observer(event):
        events.append(event)
        flo.emit(event)
    publisher = log.LogPublisher()
    publisher.addObserver(observer)
    publisher.msg('Hello!')
    self.assertEqual(len(events), 1)
    event = events[0]
    result = output.getvalue()
    prefix = '{time}    [{system}]    '.format(time=flo.formatTime(event['time']), system=event['system'])
    self.assertTrue(result.startswith(prefix), '{0!r}    does    not    start    with    {1!r}'.format(result, prefix))
