'L{app.AppLogger} using a logger observer which does not implement
L{ILogObserver} or L{LegacyILogObserver} will be wrapped in a compat
shim and raise a L{DeprecationWarning}.'

def test_unmarkedObserversDeprecated(self):

    logs = []
    logger = app.AppLogger({})
    logger._getLogObserver = (lambda : logs.append)
    logger.start(Componentized())
    self.assertIn('starting    up', textFromEventDict(logs[0]))
    warnings = self.flushWarnings([self.test_unmarkedObserversDeprecated])
    self.assertEqual(len(warnings), 1)
    self.assertEqual(warnings[0]['message'], 'Passing    a    logger    factory    which    makes    log    observers    which    do    not    implement    twisted.logger.ILogObserver    or    twisted.python.log.ILogObserver    to    twisted.application.app.AppLogger    was    deprecated    in    Twisted    16.2.    Please    use    a    factory    that    produces    twisted.logger.ILogObserver    (or    the    legacy    twisted.python.log.ILogObserver)    implementing    objects    instead.')
