def test_basicLogger(self):
        log = TestLogger()

        for level in LogLevel.iterconstants():
            format = "This is a {level_name} message"
            message = format.format(level_name=level.name)

            logMethod = getattr(log, level.name)
            logMethod(format, junk=message, level_name=level.name)

            # Ensure that test_emit got called with expected arguments
            self.assertEqual(log.emitted["level"], level)
            self.assertEqual(log.emitted["format"], format)
            self.assertEqual(log.emitted["kwargs"]["junk"], message)

            self.assertTrue(hasattr(log, "event"), "No event observed.")

            self.assertEqual(log.event["log_format"], format)
            self.assertEqual(log.event["log_level"], level)
            self.assertEqual(log.event["log_namespace"], __name__)
            self.assertEqual(log.event["log_source"], None)
            self.assertEqual(log.event["junk"], message)

            self.assertEqual(formatEvent(log.event), message)
Test that log levels and messages are emitted correctly for
dataset/ETHPy150Open twisted/twisted/twisted/logger/test/test_logger.py/LoggerTests.test_basicLogger