def addObserver(self, observer):
        """
        Registers an observer with this publisher.

        @param observer: An L{ILogObserver} to add.
        """
        if not callable(observer):
            raise TypeError("Observer is not callable: {0!r}".format(observer))
        if observer not in self._observers:
            self._observers.append(observer)

        Registers an observer with this publisher.

        @param observer: An L{ILogObserver} to add.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/logger/_observer.py