def test_customLevel(self):
        """
        Test the logLevel keyword for customizing level used.
        """
        self.lp.msg("Spam egg.", logLevel=logging.ERROR)
        self.assertIn(b"Spam egg.", self.out.getvalue())
        self.assertIn(b"ERROR", self.out.getvalue())
        self.out.seek(0, 0)
        self.out.truncate()
        self.lp.msg("Foo bar.", logLevel=logging.WARNING)
        self.assertIn(b"Foo bar.", self.out.getvalue())
        self.assertIn(b"WARNING", self.out.getvalue())

        Test the logLevel keyword for customizing level used.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_log.py